Ejemplo n.º 1
0
 protected override void OnAbilityEnded(AbilityEnded e)
 {
     if (e.ability == Context)
     {
         EndPull();
     }
 }
Ejemplo n.º 2
0
    private IEnumerator Attack(AttackState state)
    {
        var spawned = Instantiate(_shuriken);

        spawned.Init(state.Rigidbody.velocity, _attackForce);
        yield return(new WaitForSeconds(_usefulTime));

        Reset();
        AbilityEnded?.Invoke();
    }
Ejemplo n.º 3
0
 protected virtual void OnAbilityEnded(AbilityEnded e)
 {
     if (e.ability == Context)
     {
         if (Context.parentPlayer.stunned)
         {
             EndPull();
         }
     }
 }
Ejemplo n.º 4
0
 void OnAbilityEnded(AbilityEnded e)
 {
     if (e.ability == pull && hookedPlayer == null)
     {
         SetStatus(TaskStatus.Aborted);
     }
     if (e.ability == pull && e.ability.parentPlayer.GetComponent <Player>().stunned)
     {
         SetStatus(TaskStatus.Aborted);
     }
 }
    IEnumerator Attack(AttackState state)
    {
        state.Rigidbody.velocity = Vector3.zero;

        yield return(new WaitForSeconds(_attackDelay));

        SpawnShuriken(state);

        _coroutine = null;
        AbilityEnded?.Invoke();
    }
Ejemplo n.º 6
0
    private IEnumerator Attack(AttackState state)
    {
        float time = _usefulTime;

        while (time > 0)
        {
            state.Rigidbody.velocity = state.Rigidbody.velocity.normalized * _attackForce;
            time -= Time.deltaTime;
            yield return(new WaitForEndOfFrame());
        }
        Reset();
        AbilityEnded?.Invoke();
    }
Ejemplo n.º 7
0
    private IEnumerator Attack(AttackState state)
    {
        float time = _usefulTime;

        Instantiate(_shurikenTemplate);
        while (time > 0)
        {
            state.Rigidbody.velocity = Vector3.zero;
            time -= Time.deltaTime;
            yield return(new WaitForEndOfFrame());
        }

        Reset();
        AbilityEnded?.Invoke();
    }
Ejemplo n.º 8
0
 private void OnAbilityEnded()
 {
     AbilityEnded?.Invoke();
 }