-
-
Save z3t0/d43af1f49c50c049d5e91941591a6aca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System; | |
| using UnityEngine.SceneManagement; | |
| using System.Reflection; | |
| public class GameManager : MonoBehaviour { | |
| public GameManager Instance; | |
| #region Game | |
| public Game game; | |
| public int numOfPlayers {get; private set;} | |
| #endregion | |
| #region MonoBehaviour | |
| void Awake() { | |
| // Set instance | |
| Instance = this; | |
| } | |
| // Use this for initialization | |
| void Start () { | |
| } | |
| // Update is called once per frame | |
| void Update () { | |
| } | |
| #endregion | |
| public void StartGame(Game.GameMode gameMode) { | |
| // Create a game | |
| numOfPlayers = 1; | |
| switch (gameMode) { | |
| case Game.GameMode.DEATH_MATCH: | |
| Debug.Log ("create a deathmatch game"); | |
| SceneManager.LoadScene ("dmGame", LoadSceneMode.Single); | |
| 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