Ejemplo n.º 1
0
    public override void SC_Exit(bool result, SC_Callback onCompleteCallback)
    {
        _gameController.Shutdown();

        DoGlobalCleanUp();

        base.SC_Exit(result, onCompleteCallback);
    }
Ejemplo n.º 2
0
    public override void SC_Exit(bool result, SC_Callback onCompleteCallback)
    {
        if (_controller != null)
        {
            _controller.Shutdown();
        }

        base.SC_Exit(result, onCompleteCallback);
    }
Ejemplo n.º 3
0
    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        DoGlobalCleanUp();

        GameTransitionInfo data = transitionInfo as GameTransitionInfo;

        _gameController.Initialize(data);

        return(base.SC_Enter(transitionInfo, onCompleteCallback));
    }
Ejemplo n.º 4
0
    public virtual bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        IsActive = true;

        if (onCompleteCallback != null)
        {
            onCompleteCallback(this);
        }

        return(true);
    }
Ejemplo n.º 5
0
    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        _uiSystem.SetBackdropCameraActive(false);

        _controller = _controllerProvider.Get();

        HomeBaseTransitionInfo lobbyTransitionInfo = transitionInfo as HomeBaseTransitionInfo;

        _controller.Initialize(lobbyTransitionInfo);

        return(base.SC_Enter(transitionInfo, onCompleteCallback));
    }
Ejemplo n.º 6
0
    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        SetQualitySettings();
        //Log.DisableLogCategory(LogCategory.ALL);

        _progress = 0f;
        _uiSystem.SetOnProceed(ProceedToBaseState);

        UpdateProgress(1.0f, "load app");

        return(true);
    }
Ejemplo n.º 7
0
    //
    // State Controller

    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        base.SC_Enter(transitionInfo, onCompleteCallback);

        // Initialize the UI system as early as possible.
        // This creates the Camera and loads/displays the backdrop texture
        _uiSystem.InitializeCamera();

        // Kick off first of several Initialization blocks
        Primary();

        return(true);
    }
    //
    // State Controller

    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        base.SC_Enter(transitionInfo, onCompleteCallback);

        // Halt initialization if the build is expired
        if (BuildExpired())
        {
            return(true);
        }

        // Kick off first of several Initialization blocks leading up to Loading Screen display
        Primary();

        return(true);
    }
Ejemplo n.º 9
0
    public virtual void SC_Exit(bool result, SC_Callback onCompleteCallback)
    {
        IsActive = false;

        // Notify parent state if any
        NotfyParentStateOfSubStateExit(result);

        // Notify controller
        StateController.Instance.OnStateExited(this, result);

        if (onCompleteCallback != null)
        {
            onCompleteCallback(this);
        }
    }
Ejemplo n.º 10
0
    // popState - set to true to restore the state from the top of the state stack
    public void ExitState <TExitState>(bool result = true, SC_Callback onCompleteCallback = null) where TExitState : State
    {
        TExitState exitState = GetState <TExitState>();

        if (exitState != null)
        {
            ExitState(exitState, result, onCompleteCallback);

            // Clear mutually exclusive reference if exiting the current instance
            if (_existingExclusiveState == exitState)
            {
                _existingExclusiveState = null;
            }
        }
    }
Ejemplo n.º 11
0
    public override bool SC_Enter(object transitionInfo, SC_Callback onCompleteCallback = null)
    {
        // reset timeout to system settings
        Screen.sleepTimeout = SleepTimeout.SystemSetting;

//		local
        Primary();
        GetLocalData();

//		network
//		_playerService.AddOnActionDataReceived(OnDataReceived);
//        _networkSystem.OnConnectionSuccess = Primary;
//        _coroutineCreator.StartCoroutine(_networkSystem.Connect());

        return(true);
    }
Ejemplo n.º 12
0
    public void ExitState(State exitState, bool result = true, SC_Callback onCompleteCallback = null)
    {
        if (null == exitState)
        {
            return;
        }

                #if METRICS_ENABLED && INCLUDE_DEV_METRICS
        Metrics.End("State:" + exitState.Name, "State:" + exitState.Name);
                #endif

        // Remove from currently active state collection
        foreach (State state in _states)
        {
            if (state == exitState)
            {
                _states.Remove(state);
                state.SC_Exit(result, delegate(State exitedState) {
                                        #if METRICS_ENABLED && INCLUDE_DEV_METRICS
                    Metrics.End(GetType().Name + ":" + exitState.Name);
                                        #endif
                    if (onCompleteCallback != null)
                    {
                        onCompleteCallback(exitedState);
                    }
                }
                              );
                return;
            }
        }

                #if METRICS_ENABLED && INCLUDE_DEV_METRICS
        Metrics.End(GetType().Name + ":" + exitState.Name);
                #endif

        // No match found so just fire callback if any
        if (onCompleteCallback != null)
        {
            onCompleteCallback(exitState);
        }
    }