Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
                #if UNITY_EDITOR
        GameCore.SetDebugCheck(debugMode);
                #endif

        // Find the GUI Controllers if not attached
        if (InGameGUI == null)
        {
            Debug.LogError("<GM> InGameGUI was not initially attached");
            InGameGUI = GameObject.Find("InGameGUI");
        }
        if (StartGUI == null)
        {
            Debug.LogError("<GM> StartGUI was not initially attached");
            StartGUI = GameObject.Find("StartGUI");
        }
        if (GameOverGUI == null)
        {
            Debug.LogError("<GM> GameOverGUI was not initially attached");
            GameOverGUI = GameObject.Find("GameOverGUI");
        }

        // Set the default state of the game to the Start state
        ToggleGameState(GameCore.GameState.Start);
        // Set the default variables for SpawnCore just like the above
        SpawnCore.ResetSpawnVars();
    }
Esempio n. 2
0
    // Sets positions and other settings
    void SetGame()
    {
        // Set the standard settings for GameCore variables
        GameCore.ResetGameVars();
        // Set the default variables and standard settings for SpawnCore just like the above
        SpawnCore.ResetSpawnVars();

        // Tell player to reset itself
        PlayerControl.Instance.Reset();
    }