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

Added new class AbilityEntity.

parent 71812208
No related branches found
No related tags found
1 merge request!84Merge, ability cluster
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;
}
}
}
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