Ejemplo n.º 1
0
    /// <summary>
    /// Initialises the game mode manager
    /// </summary>
    void Start()
    {
        if (!Utilities.IsOpenLeveL(Utilities.GetLoadedLevel()))
        {
            m_networkedState = GameState.STAGE_1;
            m_state          = GameState.STAGE_1;

            m_countdownTimer = FindObjectOfType <GUITimer>();
            if (m_countdownTimer == null)
            {
                Debug.LogError("Could not find GUI Count down timer");
            }
        }

        m_islandList = GameObject.FindObjectsOfType <IslandDiscoveryTrigger>();
        if (m_islandList.Length == 0)
        {
            Debug.LogError("Could not find any islands");
        }

        m_fogOfWar = FindObjectOfType <FogOfWar>();
        if (m_fogOfWar == null)
        {
            Debug.LogError("Could not find Fog of war");
        }

        m_stage1CountdownFinish = () =>
        {
            SwitchToState(GameState.STAGE_2);
            m_stateInitiatedByNetwork = false;
        };

        m_stage2CountdownFinish = () =>
        {
            GameOverScript.Get().SetLevelComplete();
        };
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns whether currently game over
 /// </summary>
 static public bool IsGameOver()
 {
     return(GameOverScript.Get().IsGameOver());
 }