public override void ExecuteAfterAnimation() { base.ExecuteAfterAnimation(); if (_hit) //colpisco a fine aniamzione obv //_player.GetComponent<Rigidbody>().AddForce(_halja.getDirection()*8f,ForceMode.Impulse); { _player.GetComponent <Rigidbody>().AddExplosionForce(40f, _crow.transform.position, 7f, 0f, ForceMode.Impulse); _player.GetComponent <PlayerStatus>().TakeDamage(10f); } _crow.setPunishmentCountdown(5f); _crow.setPunishmentClock(Time.time); _crow.setChainOfDestinyClock(3f); _crow.setChainOfDestinyClock(Time.time); _stateMachine.ChangeState(_crow._MoveState); }
public override void Exit() { base.Exit(); _crow.lr.SetPosition(1, _crow.getThrowChainPosition().position); _crow.lr.enabled = false; _crow.setChainOfDestinyCountdown(5f); _crow.setChainOfDestinyClock(Time.time); _caught = false; }