Exemplo n.º 1
0
 void OnCollisionEnter(Collision c)
 {
     if (c.gameObject.tag.Equals("Player"))
     {
         if (!gm.checkpoint)
         {
             fps.transform.position = new Vector3(97.58f, 7.11f, 5.2f);
             Destroy(currentCilinder);
             currentCilinder = (GameObject)GameObject.Instantiate(cilinder, cilinder.transform.position, cilinder.transform.rotation);
             gm.powerUp      = false;
             gm.perderVida();
         }
         else
         {
             fps.transform.position = new Vector3(-74f, 7.11f, 64.1f);
             Destroy(currentCilinder);
             currentCilinder = (GameObject)GameObject.Instantiate(cilinder, cilinder.transform.position, cilinder.transform.rotation);
             gm.powerUp      = false;
             gm.perderVida();
         }
     }
 }