private void Stop() { flee = false; target = null; ai.Stop(); ai.HandleSpeed(SpeedPhase.WALK); ai.OnCaseChanged(new CaseChangedEventArgs(null, Case.WANDER)); }
public void OnCaseChanged(object sender, CaseChangedEventArgs e) { if (e.state == Case.IDLE) { defaultTime = idleTime; if (e.data != null) { e.data.SetData(this); } else { tempTime = defaultTime; } ai.currentState = Case.IDLE; ai.Stop(); Run(); } }