protected override void Initialize() { capsule = GetComponent <CapsuleCollider>(); patrol = GetComponent <PatrolPath>(); agent = GetComponent <NavMeshAgent>(); lastSighting = GetComponent <LastPlayerSighting>(); State startState = null; if (hasPatrolling) { startState = new AIStatePatrol(this); } else { startState = new AIStateIdle(this); } stateMachine.MoveTo(startState); }
protected override void Initialize() { capsule = GetComponent<CapsuleCollider>(); patrol = GetComponent<PatrolPath>(); agent = GetComponent<DungeonNavAgent>(); lastSighting = GetComponent<LastPlayerSighting>(); State startState = null; if (hasPatrolling) { startState = new AIStatePatrol(this); } else { startState = new AIStateIdle(this); } stateMachine.MoveTo(startState); }