private void Die() { if (StateCurrent == State.Figth) { AttackBehavior.Untarget(); } StateCurrent = State.Die; }
private void MoveToEnemy(Vector3 position, HealthBehaviour health) { if (StateCurrent == State.Figth) { AttackBehavior.Untarget(); } MoveToPosition(position, DistanceToEnemy); CreateEffect(position, Vector3.up, EffectFigthRef); StartCoroutine(WaitForEndMoveToEnemy(health)); StateCurrent = State.MoveToEnemy; }
private void MoveToPoint(Vector3 position, Vector3 normal) { if (StateCurrent == State.Figth) { AttackBehavior.Untarget(); } MoveToPosition(position); CreateEffect(position, normal, EffectMoveRef); StartCoroutine(WaitForEndMoveToPoint()); StateCurrent = State.MoveToPoint; }