Action() public method

public Action ( ) : void
return void
    private Coroutine StartAction(EnemyState nextState)
    {
        this.currentState = nextState;

        switch (nextState)
        {
        case EnemyState.Idle:
            currentAction = idle;
            return(CoroutineManager.Instance.StartCoroutineEx(idle.Action()));

        case EnemyState.Attack:
            Debug.LogError("不正な形でAttackが実行されようとしました。");
            currentAction = kiriage;
            return(CoroutineManager.Instance.StartCoroutineEx(kiriage.Action()));

        case EnemyState.Damage:
            currentAction = damage;
            return(CoroutineManager.Instance.StartCoroutineEx(damage.Action()));

        case EnemyState.MoveNear:
            currentAction = chasePlayer;
            return(CoroutineManager.Instance.StartCoroutineEx(chasePlayer.Action()));

        case EnemyState.Death:
            currentAction = death;
            return(CoroutineManager.Instance.StartCoroutineEx(death.Action()));

        default:
            Debug.LogError("不正な行動の呼び出しがありました。 " + nextState);
            return(null);
        }
    }