コード例 #1
0
    private void Search()
    {
        enemy.indicator.material.color = Color.yellow;
        enemy.navMeshAgent.isStopped   = true;

        enemy.transform.Rotate(0, enemy.GetSearchingTurnSpeed() * Time.deltaTime, 0);

        searchTimer += Time.deltaTime;

        if (searchTimer >= enemy.GetSearchingDuration())
        {
            ToPatrolState();
        }
    }