//------------------------------------------ void Awake() { ThisLineSight = GetComponent <LineSight>(); ThisAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); PlayerTransform = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); mouseNPC = GetComponent <MouseNPC>(); ThisAgent.stoppingDistance = stopDistance; }
// Start is called before the first frame update void Start() { mouseNPC = mouse.GetComponent <MouseNPC>(); ai_enemy = mouse.GetComponent <AI_Enemy>(); soundSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { mouseNPC = mouse.GetComponent <MouseNPC>(); ai_guard = mouse.GetComponent <AI_GuardMouse>(); soundSource = GetComponent <AudioSource>(); }
// Start is called before the first frame update void Start() { mouseNPC = mouse.GetComponent <MouseNPC>(); ai = mouse.GetComponent <AI_LookOut>(); soundSource = GetComponent <AudioSource>(); }