Ejemplo n.º 1
0
        void Update()
        {
            switch (currentState)
            {
            case States.Start:
                OnStartEvent.Invoke();
                break;

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

            case States.End:
                OnEndEvent.Invoke();
                break;
            }
        }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        switch (currentState)
        {
        case States.Start:
            OnStartEvent.Invoke();
            break;

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

        case States.End:
            OnEndEvent.Invoke();
            break;

        default:
            throw new ArgumentOutOfRangeException();
        }
    }