Ejemplo n.º 1
0
 void Update()
 {
     // If any player holds Button 4 and 5 simultaneously for 5 seconds, the game ends.
     if (TinderBoxAPI.ControlState(Players.Player1, Controls.Button4) && TinderBoxAPI.ControlState(Players.Player1, Controls.Button5) ||
         TinderBoxAPI.ControlState(Players.Player2, Controls.Button4) && TinderBoxAPI.ControlState(Players.Player2, Controls.Button5) ||
         TinderBoxAPI.ControlState(Players.Player3, Controls.Button4) && TinderBoxAPI.ControlState(Players.Player3, Controls.Button5) ||
         TinderBoxAPI.ControlState(Players.Player4, Controls.Button4) && TinderBoxAPI.ControlState(Players.Player4, Controls.Button5))
     {
         quitTimer += Time.deltaTime;
     }
     else
     {
         quitTimer = 0;
     }
     if (quitTimer > TinderBoxAPI.QuitCommandHoldLength)
     {
         Debug.Log("Quitting!");
         Application.Quit();
     }
 }
Ejemplo n.º 2
0
 void OnApplicationQuit()
 {
     TinderBoxAPI.GameOver();
 }
Ejemplo n.º 3
0
        IEnumerator Start()
        {
            yield return(new WaitForEndOfFrame());

            TinderBoxAPI.IsReady();
        }