Exemplo n.º 1
0
    /// <summary>
    /// Updates the clam images on the victory screen, and sets the clam bool in level data to true if all collected
    /// </summary>
    public void UpdateClamMedals()
    {
        if (Character.NumberFoundClams == 3)
        {
            VictoryMenu.SetImage(VictoryMenu.ClamImage1, VictoryMenu.ClamYes);
            VictoryMenu.SetImage(VictoryMenu.ClamImage2, VictoryMenu.ClamYes);
            VictoryMenu.SetImage(VictoryMenu.ClamImage3, VictoryMenu.ClamYes);

            if (LevelData.levelData != null)
            {
                //Unlock the next level
                LevelData.levelData.myLevels[Level].clams = true; // set clams collection to true
            }

            else
            {
                Debug.LogWarning("Unable to store clam medal data, no LevelData file exists. This won't occur when loading levels through the mainMenu.");
            }
        }

        if (Character.NumberFoundClams == 2)
        {
            VictoryMenu.SetImage(VictoryMenu.ClamImage1, VictoryMenu.ClamYes);
            VictoryMenu.SetImage(VictoryMenu.ClamImage2, VictoryMenu.ClamYes);
        }

        if (Character.NumberFoundClams == 1)
        {
            VictoryMenu.SetImage(VictoryMenu.ClamImage1, VictoryMenu.ClamYes);
        }
    }
Exemplo n.º 2
0
 void Start()
 {
     //busca as referências de todos os scripts de interface
     joysticks        = FindObjectsOfType <JoystickController>();
     elementInfoPanel = FindObjectOfType <ElementInfoPanel>();
     simpleInfo       = FindObjectOfType <SimpleInfo>();
     virusIntroPanel  = FindObjectOfType <VirusIntroPanel>();
     tutorialPanel    = FindObjectOfType <TutorialPanel>();
     gameOverMenu     = FindObjectOfType <GameOverMenu>();
     victoryMenu      = FindObjectOfType <VictoryMenu>();
 }
Exemplo n.º 3
0
        public override void _Ready()
        {
            root       = GetTree().Root;
            sceneStack = new List <Node>();

            _autopilotMenu = GD.Load <PackedScene>("res://scenes/encounter/AutopilotMenu.tscn").Instance() as AutopilotMenu;
            _characterMenu = GD.Load <PackedScene>("res://scenes/encounter/CharacterMenu.tscn").Instance() as CharacterMenu;
            _creditsMenu   = GD.Load <PackedScene>("res://scenes/CreditsMenu.tscn").Instance() as CreditsMenu;
            _defeatMenu    = GD.Load <PackedScene>("res://scenes/encounter/DefeatMenu.tscn").Instance() as DefeatMenu;
            _escapeMenu    = GD.Load <PackedScene>("res://scenes/encounter/EscapeMenu.tscn").Instance() as EscapeMenu;
            _helpMenu      = GD.Load <PackedScene>("res://scenes/encounter/HelpMenu.tscn").Instance() as HelpMenu;
            _inventoryMenu = GD.Load <PackedScene>("res://scenes/encounter/InventoryMenu.tscn").Instance() as InventoryMenu;
            _settingsMenu  = GD.Load <PackedScene>("res://scenes/SettingsMenu.tscn").Instance() as SettingsMenu;
            _victoryMenu   = GD.Load <PackedScene>("res://scenes/encounter/VictoryMenu.tscn").Instance() as VictoryMenu;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Game is complete
 /// </summary>
 public void GameOver()
 {
     CurrentGameState = GameState.GameOver;
     VictoryMenu.SetActive(true);
 }
Exemplo n.º 5
0
    public void Win()
    {
        VictoryMenu menu = GameObject.FindObjectOfType <VictoryMenu>();

        menu.Win();
    }
Exemplo n.º 6
0
 public OnVictoryState(FSM <StatesEnum> fsm, Grid grid, VictoryMenu victoryMenu) : base(fsm)
 {
     m_Grid        = grid;
     m_VictoryMenu = victoryMenu;
 }