diff --git a/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ef904442dc941daba5bc50fdfe3611810bdbba7 --- /dev/null +++ b/MrBigsock/Assets/Code/Core/Abilities/Base/AbilityEntity.cs @@ -0,0 +1,38 @@ +using System.Collections; +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; + + +namespace BigSock { + /* + An object representing an ability held by a player. + */ + class AbilityEntity { + + // The ability held in this slot. + public IAbility Ability { get; } + + // The index of the ability + public int Index { get; } + + // The time this ability started charging. + public float ChargeStarted { get; } + + // The keys bound to this ability. + public List<KeyCode> Keys { get; set; } + + + + + public AbilityEntity(IAbility ability, int index, List<KeyCode> keys = null) { + if(ability == null) throw new ArgumentNullException(nameof(ability)); + + keys ??= new List<KeyCode>(); + + Ability = ability; + Index = index; + } + } +}