コード例 #1
0
    void ProcessButtonInput(ScreenTypes screenType)
    {
        _currScreenController.OnScreenExit();
        _currScreenController.OnScreenDisable();
        _currScreenController.exitMinigame -= ForceExitMinigame;

        _prevScreenController = _currScreenController;
        _currScreenController = FindScreen(screenType);

        uiManager.ChangeBgColor(_currScreenController.bgColor);
        _currScreenController.exitMinigame += ForceExitMinigame;

        _currScreenController.OnScreenEnable();
        _currScreenController.OnScreenEnter();
    }
コード例 #2
0
    void Start()
    {
        foreach (var baseScreenController in baseScreenControllers)
        {
            baseScreenController.OnScreenDisable();
        }

        _currScreenController = FindScreen(ScreenTypes.HomeScreen);
        _currScreenController.OnScreenEnable();
        _currScreenController.OnScreenEnter();
        _prevScreenController = null;

        DOTween.Init(true, true, LogBehaviour.Default);
        emailDataHelper.ReloadCardData(false);

        StartCoroutine(DecressMetters());
    }
コード例 #3
0
    void HandleBackButton()
    {
        if (_prevScreenController != null)
        {
            _currScreenController.OnScreenExit();
            _currScreenController.OnScreenDisable();
            ApplyMinigameScore();
            _currScreenController.exitMinigame -= ForceExitMinigame;

            uiManager.ChangeBgColor(_prevScreenController.bgColor);
            _prevScreenController.OnScreenEnable();
            _prevScreenController.OnScreenEnter();

            _currScreenController = _prevScreenController;

            _currScreenController.exitMinigame += ForceExitMinigame;
            _prevScreenController = null;
        }
        else
        {
            Debug.Log("BACK EVENT NOT HANDLED YOU ARE AT HOME SCREEN");
        }
    }