Ejemplo n.º 1
0
 public void OnMenuClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     //SceneManager.LoadScene(0);
     GameLord.Instance.SwitchToMenu();
 }
Ejemplo n.º 2
0
 public void OnResumeClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     //Pause.SetActive(false);
     ChangeHudState(HUDState.HS_GAME);
 }
Ejemplo n.º 3
0
 public void OnExpandActive()
 {
     GUILord.ButtonSound();
     _activeExpanded = !_activeExpanded;
     ActiveButtons.SetActive(_activeExpanded);
     _hideActiveSkillsButton.SetActive(_activeExpanded);
 }
Ejemplo n.º 4
0
 public void OnPauseClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.Paused;
     //Pause.SetActive(true);
     ChangeHudState(HUDState.HS_PAUSE);
 }
Ejemplo n.º 5
0
 public void OnActiveChosen()
 {
     GUILord.ButtonSound();
     //CurrentActive.gameObject.SetActive(true);
     _activeExpanded = false;
     ActiveButtons.SetActive(false);
     _hideActiveSkillsButton.SetActive(false);
 }
Ejemplo n.º 6
0
 public void OnTutorialPopUpClick()
 {
     if (PopUpController.Instance != null)
     {
         GUILord.ButtonSound();
         PopUpController.Instance.NextPopUp();
     }
 }
Ejemplo n.º 7
0
 void Start()
 {
     if (_guiLord == null)
     {
         _guiLord = GUILord.Instance;
     }
     if (_guiLord != null)
     {
         _guiLord.OnPostGUIStateChanged += OnPostGUIStateChanged;
     }
 }
    public void ClickPlay(int levelIndex)
    {
        string[] levels     = GameLord.Instance.Levels;
        int      levelCount = levels.Length;

        if (levelIndex >= 0 && levelIndex < levelCount)
        {
            GUILord.ButtonSound();
            GameLord.Instance.LoadScene(levels[levelIndex]);
        }
    }
Ejemplo n.º 9
0
    protected override void Awake()
    {
        base.Awake();
        GameLord instance = GameLord.Instance;

        if (instance != null)
        {
        }
        GUILord guiLord = GUILord.Instance;

        if (guiLord != null)
        {
            _referenceResolution = guiLord.ReferenceResolution;
        }
    }
Ejemplo n.º 10
0
    private IEnumerator SwitchToMenuCoroutine()
    {
        GUILord instance = GUILord.Instance;

        ChangeGameState(GameState.GS_LOADING);
        while (instance.IsTransition)
        {
            yield return(null);
        }
        if (_currentSceneName != "")
        {
            UnityEngine.SceneManagement.SceneManager.UnloadScene(_currentSceneName);
            yield return(null);

            Resources.UnloadUnusedAssets();
            yield return(null);
        }
        ChangeGameState(GameState.GS_MENU);
    }
Ejemplo n.º 11
0
    public void ActivateSkill(ActiveSkillsEnum type)
    {
        GUILord.ButtonSound();
        int index = (int)type;

        if (index >= 0 && index < _activeInfoCount)
        {
            if (_activeInfos[index].unlocked && _activeInfos[index].Availible)
            {
                _activeInfos[index].Activate();
                if (_activeInfos[index].showSkillScreen)
                {
                    GUIController.Instance.ShowSkillScreen(_activeInfos[index].activeType);
                    CurrentActive = _activeInfos[index].activeType;
                }
                else
                {
                    GUIController.Instance.HideActiveSkills();
                }
            }
        }
    }
Ejemplo n.º 12
0
 public void ClickQuitApp()
 {
     GUILord.ButtonSound();
     Application.Quit();
 }
Ejemplo n.º 13
0
 public void ClickLevelSelect()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_LEVEL_SELECT);
 }
Ejemplo n.º 14
0
 public void ClickMenuMain()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_MAIN);
 }
Ejemplo n.º 15
0
 public void OnNextClick()
 {
     GUILord.ButtonSound();
     GameLord.Instance.NextLevel();
 }
Ejemplo n.º 16
0
 public void OnRestartClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     GameLord.Instance.LoadScene(GameLord.Instance.CurrentSceneName);
 }
Ejemplo n.º 17
0
 public void ClickMenuCredits()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_CREDITS);
 }