コード例 #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();
        }
    }