public override void onRespawn() { Debug.Log(gameObject.ToString() + " : OnRespawn"); princesseVie.fullSoigner(); this.princesseArme.SetArmeActive(this.armeActive); this.princesseObjetProgression.listObjet = new Dictionary <EnumObjetProgression, int>(this.listObjet); AffichageInventaire.getInstance().recreateDicoInventaireFromPrincesse(); cam.centrerCamera(); princesseDeplacement.canMove = true; princesseDeplacement.gererAnim("IsIdle"); if (!this.unlockPouvoirGlace) { princessePouvoirGlace.isUnlocked = this.unlockPouvoirGlace; GameObject.FindGameObjectWithTag("AffichagePouvoir").GetComponentInChildren <AffichagePouvoir> (true).setHidden(EnumPouvoir.pouvoirGlace); } }
// Update is called once per frame void Update() { if (activate) { if (time > Time.time) { princesse.transform.position = new Vector3(princesse.transform.position.x + x * Time.deltaTime, princesse.transform.position.y + y * Time.deltaTime, princesse.transform.position.z + z * Time.deltaTime); } if (time < Time.time) { Debug.Log("je passe ici"); princesse.GetComponent <Rigidbody>().useGravity = true; rb.canMove = true; rb.gererAnim("IsIdle"); activate = false; } } }
public override void Activation() { if (!activate && !princesseAnimator.GetBool("IsJumping")) { time = Time.time + 1f; activate = true; princesse.transform.position = new Vector3(transform.position.x + 0.6f, princesse.transform.position.y + 0.2f, transform.position.z); princesse.transform.LookAt(this.transform); princessetemp = princesse.transform.forward; princessetemp.y = 0; princesse.transform.forward = princessetemp; princesse.GetComponent <Rigidbody>().useGravity = false; //arme.armeActive rb.canMove = false; princesseAnimator.Play("idle1"); rb.gererAnim("IsClimbing"); rb.canMove = true; /* princesseAnimator.Play("idle1"); * rb.gererAnim("IsClimbing"); * rb.canMove = true;*/ } }