コード例 #1
0
 // Start is called before the first frame update
 void Start()
 {
     anim     = transform.GetComponentInChildren <Animator>();
     player   = GameObject.FindGameObjectWithTag("Player");
     doneTime = Time.time;
     agent    = GetComponent <NavMeshAgent>();
     agent.SetDestination(PatrolPoints[pointIndex = UnityEngine.Random.Range(0, PatrolPoints.Count - 1)]);
     _guardProperties = GetComponent <GuardProperties>();
 }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     agent            = GetComponent <NavMeshAgent>();
     _guardProperties = GetComponent <GuardProperties>();
 }