Ejemplo n.º 1
0
    public void Init(GameFlowController gameFlowController, Level level)
    {
        this.gameFlowController = gameFlowController;
        FindAndSetAllSubPanels();
        AddListenerToPausePanelButtons();
        this.activeLevel = level;
        if (this.activeLevel == null)
        {
            Debug.LogError("GuiManager activeLevel is null");
        }

        this.currentLevelNumber = gameFlowController.getSceneLevelNumber();
        if (this.currentLevelNumber == -1)
        {
            Debug.LogError("currentLevelNumber could not be loaded in GuiManager");
        }

        // Show Introduction just in the first level else show the enemytypes
        if (this.currentLevelNumber == 1)
        {
            ShowIntroduction();
        }

        if (this.currentLevelNumber == 2)
        {
            ShowEnemyVegan();
        }

        if (this.currentLevelNumber == 3)
        {
            ShowEnemyFattie();
        }

        if (this.currentLevelNumber == 4)
        {
            SetVisibilityAllPanels(false);
            SetVisibilityCursor(true);
            OnNextIntroductionSandwichButton();
        }

        if (this.currentLevelNumber == 5)
        {
            SetVisibilityAllPanels(false);
            SetVisibilityCursor(true);
            OnNextIntroductionSandwichButton();
        }
    }