Ejemplo n.º 1
0
        public bool TryStore(SceneSkill ability)
        {
            if (!_isEnabled) // TODO NPC
            {
                return(false);
            }

            // TODO: why are we putting hearts in our inventory?
            if (ability == null)
            {
                return(false);
            }

            VirtualSlot slot;

            if (BestFit(ability, out slot))
            {
                slot.Store(ability);
                return(true);
            }
            else if (FirstFit(ability, out slot))
            {
                slot.Store(ability);
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
 // TODO remove and controller here directly
 public void OnAbilitySelected(SceneSkill ability)
 {
     OnAbilitySelectedHandler?.Invoke(ability);
 }