예제 #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();
     }
 }
예제 #2
0
 void OnApplicationQuit()
 {
     TinderBoxAPI.GameOver();
 }
예제 #3
0
        IEnumerator Start()
        {
            yield return(new WaitForEndOfFrame());

            TinderBoxAPI.IsReady();
        }