Esempio n. 1
0
    private void Construct(IRaceOverState _state)
    {
        m_state = _state;

        // Listen for state events
        m_fader = GetComponent <UIFader> ();
        m_fader.RegisterStateCallbacks((State)m_state);

        // turn off this gameobject in case it is active
        gameObject.SetActive(false);
    }
Esempio n. 2
0
    private void Construct(RaceManager _raceManager,
                           IRaceSetupState raceSetupState,
                           IRacingState _racingState,
                           IRaceOverState _raceOverState)
    {
        m_raceManager = _raceManager;
        m_racingState = _racingState;

        UIFader fader = GetComponent <UIFader> ();

        fader.RegisterStateCallbacks(
            (State)_racingState,
            (State)_raceOverState);
        ((State)raceSetupState).m_enteredState += fader.Deactivate;

        gameObject.SetActive(false);
    }