예제 #1
0
    //Win/Lose cases
    public void HandleWinning()
    {
        //This method is callled at WorkProcess(), before dayEvent is processed. So, we simply override whatever event that may have been set with a Winning event,
        //and let it handle game loss display.
        print("Player has won");
        currentGameState = GameState.endGame;

        GameObject    eventHolder = Instantiate(new GameObject("GameOver_Win"), Vector3.zero, new Quaternion(), this.transform);
        ScenarioEvent newEvent    = (ScenarioEvent)eventHolder.AddComponent(typeof(Win));

        simMan.AddScenarioEvent(newEvent, true);
    }