Beispiel #1
0
 private void OnChangeLevelStateEvent(ChangeLevelStateEvent e)
 {
     if (e.newState == DestroyState)
     {
         gameObject.Destroy();
     }
 }
 private void OnChangeLevelStateEvent(ChangeLevelStateEvent e)
 {
     if (e.newState == ActiveState)
     {
         gameObject.SetActive(true);
     }
     else
     {
         gameObject.SetActive(false);
     }
 }
Beispiel #3
0
    private void OnChangeLevelStateEvent(ChangeLevelStateEvent e)
    {
        switch (e.newState)
        {
        case LevelState.In_Game:
            MenuUISetActive(false);
            GameUISetActive(true);
            CreatePlayer();
            break;

        case LevelState.In_Menu:
            MenuUISetActive(true);
            GameUISetActive(false);
            break;

        default:
            Debug.LogError("ExLevelController was changed to an invalid state");
            break;
        }
    }
    private void OnChangeLevelStateEvent(ChangeLevelStateEvent e)
    {
        switch (e.newState)
        {
            case LevelState.In_Game:
                MenuUISetActive(false);
                GameUISetActive(true);
                CreatePlayer();
                break;

            case LevelState.In_Menu:
                MenuUISetActive(true);
                GameUISetActive(false);
                break;

            default:
                Debug.LogError("ExLevelController was changed to an invalid state");
                break;
        }
    }