Exemple #1
0
    public AirVRClientStateMachine(Context context, float delayToResume)
    {
        _context          = context;
        stateDisconnected = new StateDisconnected(this);
        stateReady        = new StateReady(this);
        stateUnfocused    = new StateUnfocused(this);
        statePlaying      = new StatePlaying(this);
        stateInactive     = new StateInactive(this);
        statePaused       = new StatePaused(this);
        stateResuming     = new StateResuming(this, delayToResume);

        _state          = stateDisconnected;
        _lastAppFocused = true;
    }
Exemple #2
0
    private void Awake()
    {
        m_hActor = GetComponent<MadMaxActor>();
        m_hRigidbody = GetComponent<Rigidbody>();
        m_hLight = GetComponentInChildren<Light>();

        m_hBulb = new LightBulb(this);

        inactive = new StateInactive(this);
        active = new StateActive(this);
        explode = new StateExplode(this);

        inactive.Active = active;
        active.Inactive = inactive;
        active.Explode = explode;
        explode.Inactive = inactive;

        inactive.OnStateEnter();
        currentState = inactive;

        m_hBulb.Reset();
    }
 /// <summary>
 /// Populate values from the base palette.
 /// </summary>
 public void PopulateFromBase()
 {
     // Populate only the designated styles
     StateActive.PopulateFromBase(PaletteState.Normal);
     StateInactive.PopulateFromBase(PaletteState.Disabled);
 }