Example #1
0
 private void Update()
 {
     if (transform.position.y < -10.0f || transform.position.y > 10.0f || transform.position.x < -10.0f || transform.position.x > 10.0f)
     {
         resetButton.LoadLvl();
     }
 }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     transform.Rotate(rotation);
     if (transform.position.y < -10.0f || transform.position.y > 10.0f || transform.position.x < -10.0f || transform.position.x > 10.0f)
     {
         resetButton.LoadLvl();
     }
 }