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 }
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); }
protected virtual void OnEnable() { npc = this.GetComponent <NPC_BaseClass>(); idleState = this; avoidState = this.GetComponent <AvoidState>(); }