public override void OnFinishScan() { StateMachine stateMachine = this.GetComponent <StateMachine> (); ReturnToPatrolState returnToPatrolState = this.GetComponent <ReturnToPatrolState> (); stateMachine.ChangeState(returnToPatrolState); }
public override void Enter() { PathRequestManager.RequestPath(transform.position, investigationSubject, OnPathFound); speed = this.GetComponent <BasicEnemy> ().speed; alertState = this.GetComponent <AlertState> (); returnToPatrolState = this.GetComponent <ReturnToPatrolState> (); patrolState = this.GetComponent <PatrolState> (); investigateScanState = this.GetComponent <InvestagateScanState> (); stateMachine = this.GetComponent <StateMachine> (); FollowPathCoroutine = FollowPath(); }