private void OnEnable() { // Instantiate all variables npc = this.GetComponent <NPC_BaseClass>(); idleState = this.GetComponent <IdleBasicState>(); Avoiding = null; }
protected virtual void OnEnable() { npc = this.GetComponent <NPC_BaseClass>(); idleState = this; avoidState = this.GetComponent <AvoidState>(); }
private void OnEnable() { npc = this.GetComponent <NPC_BaseClass>(); wanderState = this.GetComponent <WanderState>(); avoidState = this.GetComponent <AvoidState>(); }