protected override void OnAbilityEnded(AbilityEnded e) { if (e.ability == Context) { EndPull(); } }
private IEnumerator Attack(AttackState state) { var spawned = Instantiate(_shuriken); spawned.Init(state.Rigidbody.velocity, _attackForce); yield return(new WaitForSeconds(_usefulTime)); Reset(); AbilityEnded?.Invoke(); }
protected virtual void OnAbilityEnded(AbilityEnded e) { if (e.ability == Context) { if (Context.parentPlayer.stunned) { EndPull(); } } }
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(); }
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(); }
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(); }
private void OnAbilityEnded() { AbilityEnded?.Invoke(); }