private void OnEnable()
 {
     npc        = this.GetComponent <NPC_Citizen1>();
     idleState  = this.GetComponent <IdleBasicState>();
     avoidState = this.GetComponent <AvoidState>();
     // Slightly delay meeting so NPCs don't start out directly meeting
 }
Exemple #2
0
    public override void OnEnable()
    {
        idleState    = this.GetComponent <IdleBasicState>();
        currentState = idleState;

        guaranteeAnimatorAndNavMesh();
    }
 private void OnEnable()
 {
     // Instantiate all variables
     npc       = this.GetComponent <NPC_BaseClass>();
     idleState = this.GetComponent <IdleBasicState>();
     Avoiding  = null;
 }
 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>();
 }
 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);
 }
Exemple #6
0
 protected virtual void OnEnable()
 {
     npc        = this.GetComponent <NPC_BaseClass>();
     idleState  = this;
     avoidState = this.GetComponent <AvoidState>();
 }