private void OnEnable()
 {
     npc             = this.GetComponent <NPC_Citizen1>();
     idleState       = this.GetComponent <IdleBasicState>();
     avoidState      = this.GetComponent <AvoidState>();
     _taskController = this.GetComponent <NPC_Task_Controller>();
     meetState       = this.GetComponent <MeetNPCState>();
     meetPlayerState = this.GetComponent <MeetPlayerState>();
 }
Example #2
0
 private void OnEnable()
 {
     npc             = this.GetComponent <NPC_Citizen1>();
     idleState       = this.GetComponent <IdleBasicState>();
     avoidState      = this.GetComponent <AvoidState>();
     meetPlayerState = this.GetComponent <MeetPlayerState>();
     // Slightly delay meeting so NPCs don't start out directly meeting
     Invoke("ReadyToMeetAgain", meetingTime);
 }
 protected override void OnEnable()
 {
     npc              = this.GetComponent <NPC_BaseClass>();
     idleState        = this;
     avoidState       = this.GetComponent <AvoidState>();
     performTaskState = this.GetComponent <PerformTaskState>();
     _taskController  = this.GetComponent <NPC_Task_Controller>();
     meetState        = this.GetComponent <MeetNPCState>();
     meetPlayerState  = this.GetComponent <MeetPlayerState>();
 }