public NPC_Alert(NPC_BehaviorAI npcStatePattern) { npc = npcStatePattern; npcSight = npc.npcSight; npcMove = npc.npcMove; npcStats = npc.npcStats; }
void SetInitialReferences() { npcSight = new NPC_Sight(this); npcMove = new NPC_Movement(this); npcStats = new NPC_Stats(); //GetComponent<NPC_Stats>(); myNavMeshAgent = GetComponent <NavMeshAgent>(); currentState = patrolState; }
float minRange = 5; // The range for when the npc should move to target location. If target is within range, npc will not move. public NPC_Movement(NPC_BehaviorAI _npc) { npc = _npc; npcStats = npc.npcStats; npcSight = npc.npcSight; }
public NPC_Sight(NPC_BehaviorAI _npc) { npc = _npc; npcStats = npc.npcStats; }