示例#1
0
 // for all neccesery input
 void Controls()
 {
     if (Input.GetButtonDown("Down"))
     {
         tetro.Boost(true);
     }
     if (Input.GetButtonUp("Down"))
     {
         tetro.Boost(false);
     }
     if (Input.GetButtonDown("Up"))
     {
         tetro.Rotate(true);
     }
     if (Input.GetButton("Left"))
     {
         tetro.Move(true);
     }
     else if (Input.GetButton("Right"))
     {
         tetro.Move(false);
     }
 }