private IEnumerator wait(AIStateMachine_zombie pb, bool nextPathCalculated, bool coroutinePatrolEnded) { pb.setNextRandomPoint(); yield return(new WaitForSeconds(waitTime)); nextPathCalculated = false; coroutinePatrolEnded = true; StopCoroutine(wa); }
private IEnumerator loadAnimationSeek(AIStateMachine_zombie pb, bool coroutinePatrolEnded, bool nextPathCalculated, float idletime, float animation_speed) { coroutinePatrolEnded = false; yield return(new WaitForSeconds((idletime) / animation_speed)); wa = StartCoroutine(wait(pb, nextPathCalculated, coroutinePatrolEnded)); StopCoroutine(co); }
public void loadAnimSeek(AIStateMachine_zombie pb, bool coroutinePatrolEnded, bool nextPathCalculated, float idletime, float animation_speed) { co = StartCoroutine(loadAnimationSeek(pb, coroutinePatrolEnded, nextPathCalculated, idletime, animation_speed)); }
public void coroutineWait(AIStateMachine_zombie pb, bool nextPathCalculated, bool coroutinePatrolEnded) { wa = StartCoroutine(wait(pb, nextPathCalculated, coroutinePatrolEnded)); }