public void Rez() // fonction exceptionnelle pour pouvoir changer de state quand on est mort et etre rez { myRezZone.Deactivate(); this.GetComponent <Fighter>().currentHp = character.baseHp; LevelUp(0); canRez = false; MovementState state = new Idle(this); //Debug.Log("changing state"); if (currentMovementState != null) { currentMovementState.OnStateExit(); } currentMovementState = state; state.OnStateEnter(); }