Exemplo n.º 1
0
 public void HandleKeyDown(string key)
 {
     if (key.Equals("space"))
     {
         GGJGameManager.SetState("play");
     }
     else
     {
         Player player;
         if (GGJGameManager.TryGetPlayer(key, out player))
         {
             player.ResetSize();
             player.Jump();
         }
         else
         {
             GameObject playerGO = GameObject.Instantiate(_playerPrefab);
             player = playerGO.GetComponent <Player>();
             player.Setup(key);
             GGJGameManager.AddPlayer(key, player);
         }
     }
 }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     GGJGameManager.SetState("joinGame");
 }
Exemplo n.º 3
0
 public void TestUI()
 {
     GGJGameManager.SetState("play");
 }
Exemplo n.º 4
0
 public void Quit()
 {
     //Application.Quit();
     GGJGameManager.SetState("mainMenu");
 }