Ejemplo n.º 1
0
    private void Update()
    {
        switch (currentState)
        {
        case States.Starting:
            StartingEvent.Invoke();
            break;

        case States.Playing:
            PlayingEvent.Invoke();
            break;

        case States.Ending:
            EndingEvent.Invoke();
            break;

        case States.Dying:
            DyingEvent.Invoke();
            break;

        default:
            throw new ArgumentOutOfRangeException();

            //back in unity, now we have the events. If you change the current event, it'll play whichever one you select.
        }
    }
Ejemplo n.º 2
0
    //Toward end of Stream on 4/1/2019: Introduces hard-coded dynamic alternatives if doesn't work?

    public void OnSwitch()
    {
        switch (CurrentStates)
        {
        case States.Starting:
            StartingEvent.Invoke();
            break;

        case States.Playing:
            PlayingEvent.Invoke();
            break;

        case States.Ending:
            EndingEvent.Invoke();
            break;

        default:
            //Work
            break;
        }
    }
Ejemplo n.º 3
0
    void Update()
    {
        switch (CurrentState)
        {
        case States.Starting:
            StartingEvent.Invoke();
            break;

        case States.Playing:
            PlayingEvent.Invoke();
            break;

        case States.Dying:
            DyingEvent.Invoke();
            break;

        case States.Ending:
            EndingEvent.Invoke();
            break;

        default:
            throw new ArgumentOutOfRangeException();
        }
    }