Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (timer.GetSeconds() > 9)
     {
         time.text = "Time " + timer.getMinutes() + ":" + timer.GetSeconds();
     }
     else
     {
         time.text = "Time " + timer.getMinutes() + ":0" + timer.GetSeconds();
     }
     gasoline.text = "Gasoline " + playerMove.GetGasoline();
     if ((int)(playerRigid.velocity.y * 10) > 0)
     {
         verticalVel.text = "Vertical vel " + (int)Mathf.Abs(playerRigid.velocity.y * 10) + " Up";
     }
     else if ((int)(playerRigid.velocity.y * 10) < 0)
     {
         verticalVel.text = "Vertical vel " + (int)Mathf.Abs(playerRigid.velocity.y * 10) + " Down";
     }
     else
     {
         verticalVel.text = "Vertical vel " + (int)Mathf.Abs(playerRigid.velocity.y * 10);
     }
     if ((int)(playerRigid.velocity.x * 10) < 0)
     {
         horizontalVel.text = "Horizontal vel " + (int)Mathf.Abs(playerRigid.velocity.x * 10) + " Left";
     }
     else if ((int)(playerRigid.velocity.x * 10) > 0)
     {
         horizontalVel.text = "Horizontal vel " + (int)Mathf.Abs(playerRigid.velocity.x * 10) + " Right";
     }
     else
     {
         horizontalVel.text = "Horizontal vel " + (int)Mathf.Abs(playerRigid.velocity.x * 10);
     }
     altitude.text = "Altitude " + (int)alt.GetAltitude() + "KM";
     points.text   = "Points " + pS.GetPoints();
 }
Exemple #2
0
 public bool GetHasGasoline()
 {
     return(myMove.GetGasoline() > 0);
 }