예제 #1
0
    public Spell(InputAction.Spell type, ReloadType reloadType, int reloadData, bool instant)
    {
        this.type         = type;
        this.reloadType   = reloadType;
        ReloadData        = reloadData;
        Instant           = instant;
        _actualReloadData = reloadData;
        _icon             = null;
        _dataDisplay      = null;
        switch (reloadType)
        {
        case ReloadType.USAGE:
            _actualReloadData = reloadData;
            break;

        case ReloadType.COOLDOWN:
            _actualReloadData = 0;
            if (_icon != null)
            {
                _icon.color = Color.white;
            }
            break;
        }
    }
예제 #2
0
 public void Deactivate(InputAction.Spell spell)
 {
     SpellDict[spell].Deactivate();
 }
예제 #3
0
 public bool IsActivated(InputAction.Spell spell)
 {
     return(SpellDict[spell].Activated);
 }
예제 #4
0
 public void Cancel(InputAction.Spell spell)
 {
     SpellDict[spell].Cancel();
 }
예제 #5
0
 public bool IsAvailable(InputAction.Spell spell)
 {
     return(SpellDict[spell].IsAvailable());
 }
예제 #6
0
 public bool Activate(InputAction.Spell spell)
 {
     return(SpellDict[spell].Activate());
 }
예제 #7
0
 public Spell Get(InputAction.Spell spell)
 {
     return(SpellDict[spell]);
 }
예제 #8
0
 public void AttachDisplay(InputAction.Spell spell, string container)
 {
     SpellDict[spell].AttachDisplay(container);
 }
예제 #9
0
 public void Add(InputAction.Spell type, Spell spell)
 {
     SpellDict[type] = spell;
 }