Example #1
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();
    }
Example #2
0
 private void Update()
 {
     currentState = currentState.OnStateUpdate();
     STATE_DEBUG = currentState.ToString();
 }
Example #3
0
 internal void Reset()
 {
     inactive.OnStateEnter();
     currentState = inactive;
     m_hBulb.Reset();
 }