Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     //Physics();
     if (hp <= 0)
     {
         canvasController.ActiveLostPanel();
         Time.timeScale = 0;
     }
     //print(isGrounded);
     if (Input.GetKeyDown(KeyCode.Alpha1))
     {
         ToYellow();
     }
     else if (Input.GetKeyDown(KeyCode.Alpha2))
     {
         ToBlue();
     }
     else if (Input.GetKeyDown(KeyCode.Alpha3))
     {
         ToRed();
     }
     if (invulnerabilityTimer >= 0)
     {
         StartCoroutine("Invulnerability");
         //Invulnerability();
     }
     else
     {
         invulnerability = false;
         sr.enabled      = true;
     }
 }