Ejemplo n.º 1
0
 public void ShowMenu()
 {
     MainMenuPanel.SetActive(true);
     ControlsPanel.SetActive(false);
     VictoryPanel.SetActive(false);
     GameOverPanel.SetActive(false);
 }
Ejemplo n.º 2
0
        public void Ctor(IReactiveProperty <EnumBattleWindow> battleState)
        {
            base.Ctor();
            LevelGeneratorPanel.Ctor();
            FightPanel.Ctor();
            VictoryPanel.Ctor();
            PausePanel.Ctor();
            FailPanel.Ctor();

            _battleState = battleState;

            _battleState.Subscribe(_ =>
            {
                if (!enabled)
                {
                    return;
                }
                if (_battleState.Value == EnumBattleWindow.DungeonGenerator)
                {
                    LevelGeneratorPanel.Show();
                }
                else
                {
                    LevelGeneratorPanel.Hide();
                }
                if (_battleState.Value == EnumBattleWindow.Fight)
                {
                    FightPanel.Show();
                }
                else
                {
                    FightPanel.Hide();
                }
                if (_battleState.Value == EnumBattleWindow.Victory)
                {
                    VictoryPanel.Show();
                }
                else
                {
                    VictoryPanel.Hide();
                }
                if (_battleState.Value == EnumBattleWindow.Fail)
                {
                    FailPanel.Show();
                }
                else
                {
                    FailPanel.Hide();
                }
                if (_battleState.Value == EnumBattleWindow.Pause)
                {
                    PausePanel.Show();
                }
                else
                {
                    PausePanel.Hide();
                }
            }).AddTo(_subscriptions);
        }
Ejemplo n.º 3
0
        private void VictoryPanel_Show(On.VictoryPanel.orig_Show orig, VictoryPanel self, object[] parameters)
        {
            orig(self, parameters);
            Dungeon           d     = SingletonManager.Get <Dungeon>(true);
            AgePrimitiveLabel label = new DynData <VictoryPanel>(self).Get <AgePrimitiveLabel>("informationLabel");

            label.Text += " - Time: " + d.Statistics.GetStat(DungeonStatistics.Stat_GameTime).DurationToString();
        }
Ejemplo n.º 4
0
    public void showVictoryPanel(GameManagerBehaviour.GameWinState winState)
    {
        VictoryPanel victoryPanel = Instantiate(victoryPanelPrefab, transform);

        switch (winState)
        {
        case GameManagerBehaviour.GameWinState.Win:
            victoryPanel.setupVictory();
            break;

        case GameManagerBehaviour.GameWinState.Loss:
            victoryPanel.setupLoss();
            break;

        case GameManagerBehaviour.GameWinState.Tie:
            victoryPanel.setupTie();
            break;
        }

        disableUI();
        victoryPanel.continueButton.onClick.AddListener(victoryPanelContinueButton);
    }
Ejemplo n.º 5
0
 public void Restart()
 {
     DefeatPanel.SetActive(false);
     VictoryPanel.SetActive(false);
 }
Ejemplo n.º 6
0
 public void SetVictory()
 {
     VictoryPanel.SetActive(true);
 }
Ejemplo n.º 7
0
 public void ShowVictoryPanel()
 {
     VictoryPanel.SetActive(true);
 }