예제 #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;
        }
    }
예제 #2
0
    // 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();
        }
    }