Exemplo n.º 1
0
 public virtual void Initialize(AbilityController abilityController)
 {
     cooldownCoroutine = CooldownTick();
     Caster            = abilityController;
     cooldown          = new WaitForSeconds(abilityInformation.CooldownTime);
     //Call this in child class then do custom behavior.
 }
Exemplo n.º 2
0
        public static IAbilityHandler Create(IAbility[] abilities, AbilityController abilityController)
        {
            var newAbilityHandler = new AbilityHandler();

            if (abilities != null)
            {
                for (int i = 0; i < abilities.Length; i++)
                {
                    abilities[i].Initialize(abilityController);
                    newAbilityHandler.AddAbility(i, abilities[i]);
                }
            }
            else
            {
                OutputHandler.Say("Null list received by AbilityHandler Factory.");
            }

            return(newAbilityHandler);
        }