Skip to content
Snippets Groups Projects
Commit b085f977 authored by Robin Halseth Sandvik's avatar Robin Halseth Sandvik
Browse files

Added new base classes for items tied to some conditions.

parent 4e31861b
No related branches found
No related tags found
1 merge request!22Implemented initial version of conditional items.
......@@ -14,12 +14,12 @@ namespace BigSock.Item {
/*
The type of trigger this item uses.
*/
public TriggerType Trigger { get; set; }
public abstract TriggerType Trigger { get; }
/*
The handler to activate when the condition is triggered.
*/
public Action<ICharEventParams> Handler { get; set; }
//public Action<ICharEventParams> Handler { get; set; }
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user recieves fatal damage.
*/
public abstract class OnDeathItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.Death;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, Character target, AttackStats attack);
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user attacks.
*/
public abstract class OnFireItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.Fire;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, AttackStats attack);
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user heals.
*/
public abstract class OnHealItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.Heal;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, int amount);
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user hits an enemy.
*/
public abstract class OnHitItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.Hit;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, Character target, AttackStats attack);
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user kills an enemy.
*/
public abstract class OnKillItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.Kill;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, Character target, AttackStats attack);
}
}
\ No newline at end of file
using System.Collections;
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
namespace BigSock.Item {
/*
Base class for all items that trigger when the user takes damage.
*/
public abstract class OnTakeDamageItemBase : ConditionalItemBase {
/*
The type of trigger this item uses.
*/
public override TriggerType Trigger => TriggerType.TakeDamage;
/*
The handler to activate when the condition is triggered.
*/
public abstract void Handler(Character source, Character target, AttackStats attack);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment