예제 #1
0
 public void OnMenuClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     //SceneManager.LoadScene(0);
     GameLord.Instance.SwitchToMenu();
 }
예제 #2
0
 public void OnResumeClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     //Pause.SetActive(false);
     ChangeHudState(HUDState.HS_GAME);
 }
예제 #3
0
 public void OnExpandActive()
 {
     GUILord.ButtonSound();
     _activeExpanded = !_activeExpanded;
     ActiveButtons.SetActive(_activeExpanded);
     _hideActiveSkillsButton.SetActive(_activeExpanded);
 }
예제 #4
0
 public void OnPauseClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.Paused;
     //Pause.SetActive(true);
     ChangeHudState(HUDState.HS_PAUSE);
 }
예제 #5
0
 public void OnActiveChosen()
 {
     GUILord.ButtonSound();
     //CurrentActive.gameObject.SetActive(true);
     _activeExpanded = false;
     ActiveButtons.SetActive(false);
     _hideActiveSkillsButton.SetActive(false);
 }
예제 #6
0
 public void OnTutorialPopUpClick()
 {
     if (PopUpController.Instance != null)
     {
         GUILord.ButtonSound();
         PopUpController.Instance.NextPopUp();
     }
 }
예제 #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]);
        }
    }
예제 #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;
        }
    }
예제 #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);
    }
예제 #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();
                }
            }
        }
    }
 public void ClickQuitApp()
 {
     GUILord.ButtonSound();
     Application.Quit();
 }
 public void ClickLevelSelect()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_LEVEL_SELECT);
 }
 public void ClickMenuMain()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_MAIN);
 }
예제 #15
0
 public void OnNextClick()
 {
     GUILord.ButtonSound();
     GameLord.Instance.NextLevel();
 }
예제 #16
0
 public void OnRestartClick()
 {
     GUILord.ButtonSound();
     GameController.Instance.GameState = EGameState.InGame;
     GameLord.Instance.LoadScene(GameLord.Instance.CurrentSceneName);
 }
 public void ClickMenuCredits()
 {
     GUILord.ButtonSound();
     ChangeMenuState(FastMenuState.FMS_CREDITS);
 }