예제 #1
0
    // Use this for initialization
    void Start()
    {
        agent       = GetComponent <NavMeshAgent>();
        setPosition = GetComponent <SetEnemy>();
        agent.speed = 1;

        SetState("wait");
    }
예제 #2
0
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
     }
 }