Exemple #1
0
    void Update()
    {
        switch (CurrentEnemyState)
        {
        case TheEnemyState.Killing:
            OnKillingEvent.Invoke();
            break;

        case TheEnemyState.Search:
            OnSearchEvent.Invoke();
            break;

        case TheEnemyState.Dying:
            OnDyingEvent.Invoke();
            break;

        case TheEnemyState.Idle:
            OnIdleEvent.Invoke();
            break;
        }
    }
    // Update is called once per frame
    void Update()
    {
        switch (CurrentEnemyState)
        {
        case TheEnemyState.Killing:
            OnKillingEvent.Invoke();
            break;

        case TheEnemyState.Search:
            OnSearchEvent.Invoke();
            break;

        case TheEnemyState.Dying:
            OnDyingEvent.Invoke();
            break;

        case TheEnemyState.Idle:
            OnIdleEvent.Invoke();
            break;

        default:
            throw new ArgumentOutOfRangeException();
        }
    }