Example #1
0
 // TODO: Replace by animation effect
 public virtual void AnimateAbility(Actions.SceneSkill action)
 {
     if (Animator != null)
     {
         //Animator.Play("Attack");
     }
 }
Example #2
0
        public virtual bool TryUseAbilityAgainst(Actions.SceneSkill ability, BaseObject target)
        {
            if (!IsMovementInputEnabled)
            {
                return(false);
            }

            if (AbilityUser.TryUseAgainst(ability, target))
            {
                AnimateAbility(ability);
                return(true);
            }

            return(false);
        }
Example #3
0
        public virtual bool TryUseAbility(Actions.SceneSkill ability)
        {
            if (!IsMovementInputEnabled)
            {
                return(false);
            }

            if (AbilityUser.TryUse(ability))
            {
                AnimateAbility(ability);
                return(true);
            }

            return(false);
        }
        public virtual bool TryUseAgainst(SceneSkill ability, BaseObject target)
        {
            if (IsLagging)
            {
                return(false);
            }

            if (ability.TryUseAgainst(target))
            {
                IsLagging = true;
                ability.OnEndLagFinishedHandler += OnAbilityEndLagFinished;
                return(true);
            }

            return(false);
        }
        public virtual bool TryUse(SceneSkill ability)
        {
            if (IsLagging)
            {
                return(false);
            }

            if (_focusTargets.Count != 0)
            {
                return(TryUseAgainst(ability, _focusTargets[0]));
            }
            else
            {
                if (ability.TryUse())
                {
                    IsLagging = true;
                    ability.OnEndLagFinishedHandler += OnAbilityEndLagFinished;
                    return(true);
                }
            }

            return(false);
        }
 public void Select(SceneSkill ability)
 {
     _currentAbility = ability;
 }
Example #7
0
 //TODO handle in states
 public void OnAbilitySelected(Actions.SceneSkill ability)
 {
     AbilityUser.Select(ability);
 }