// -------------------------------------------------------------------
        // Private
        // -------------------------------------------------------------------
        private void OnGameStateSwitchRequest(EventSwitchGameState eventData)
        {
            // First we ensure that we are in the right scene for the new master state
            EnsureTransitionForMasterState(eventData.MasterState);

            // Now set this as the active state
            this.Parent.GameState.MasterState = eventData.MasterState;
        }
Beispiel #2
0
    void OnEventSwitchGameState(Event evt)
    {
        EventSwitchGameState state = evt as EventSwitchGameState;

        if (state.newState == Game.GameState.STARTMENU)
        {
            GetPanelByName("MenuStart").CreatePanel();
        }
    }