Ejemplo n.º 1
0
    public void LoadScene(uint stageID, GameStateManager.State newStateOnLoad) //this, coupled with the requiremnt that positive stageIDs should only be used for playable stages,
    {                                                                          //should mean that this version of LoadScene will be used only for playable stages.
        Stage targetStage = StagesData.GetStageParameters(stageID);

        if (targetStage == null)
        {
            print("ERROR! Attempting to load a stage with an ID not existant in the database. ID: " + stageID);
            return;
        }

        print("Switching to scene: " + targetStage.name);
        GameManager.stateMan.UpdateStageParameters((int)stageID);
        LoadScene(targetStage.name, newStateOnLoad);
    }
Ejemplo n.º 2
0
    void GameStateChanged(GameStateManager.State state)
    {
        if (ManualControl)
        {
            return;
        }

        // Switch on the state that has changed
        switch (state)
        {
        case GameStateManager.State.Day:
            if (ShowDuringDay && hiding)
            {
                Show();
            }
            else if (!ShowDuringDay && !hiding)
            {
                Hide();
            }
            break;

        case GameStateManager.State.Night:
            if (ShowDuringNight && hiding)
            {
                Show();
            }
            else if (!ShowDuringNight && !hiding)
            {
                Hide();
            }
            break;

        case GameStateManager.State.Attacking:
            if (ShowDuringAttacking && hiding)
            {
                Show();
            }
            else if (!ShowDuringAttacking && !hiding)
            {
                Hide();
            }
            break;
        }
    }
Ejemplo n.º 3
0
 public Option(string title, GameStateManager.State executedState)
 {
     this.title         = title;
     this.executedState = executedState;
 }
Ejemplo n.º 4
0
 public void LoadScene(string sceneName, GameStateManager.State newStateOnLoad)
 {
     targetSceneName = sceneName;
     stateOnLoad     = newStateOnLoad;
     SwitchToLoadingScreen();
 }