Пример #1
0
 private void Stop()
 {
     flee   = false;
     target = null;
     ai.Stop();
     ai.HandleSpeed(SpeedPhase.WALK);
     ai.OnCaseChanged(new CaseChangedEventArgs(null, Case.WANDER));
 }
Пример #2
0
    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();
        }
    }