Skip to content

Instantly share code, notes, and snippets.

@z3t0
Created August 2, 2016 18:44
Show Gist options
  • Select an option

  • Save z3t0/37d2450e99152ac1e94e58f83918c636 to your computer and use it in GitHub Desktop.

Select an option

Save z3t0/37d2450e99152ac1e94e58f83918c636 to your computer and use it in GitHub Desktop.
// Create a game
Debug.Log("Create a single player game: " + gameMode);
SceneManager.LoadScene ("dmGame", LoadSceneMode.Single);
switch (gameMode) {
case Game.GameMode.DEATH_MATCH:
Debug.Log ("create a deathmatch game");
GameObject go = GameObject.Find ("/Everything/Game");
if (go == null)
Debug.LogError ("cant find game");
game = go.GetComponent<DMGame> ();
game.Init (1);
break;
default:
Debug.LogError ("Gamemode not yet implemented");
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment