// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { princesseArme = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseArme>(); deplacement = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>(); deplacement.LockPrincesse(); princesseArme.getHandArme().GetComponent <BoxCollider>().enabled = false; }
public void mourir() { vie_courante = 0; PlayOneTimeDie = true; sm.pauseAllSound(); anim.Play("die"); anim.SetBool("IsDead", true); sm.playOneShot(PrincesseMort); deplacement.LockPrincesse(); GameControl.control.vie = vie_courante; Debug.Log("vie courante : " + vie_courante); }