protected UtilityAIClient(IUtilityAI ai, IContextProvider contextProvider) { Ensure.ArgumentNotNull(ai, "ai"); Ensure.ArgumentNotNull(contextProvider, "contextProvider"); this._ai = ai; this._contextProvider = contextProvider; this.state = UtilityAIClientState.Stopped; }
public void Resume() { if (this.state != UtilityAIClientState.Paused) { return; } this.state = UtilityAIClientState.Running; this.OnResume(); }
public void Pause() { if (this.state != UtilityAIClientState.Running) { return; } this.state = UtilityAIClientState.Paused; this.OnPause(); }
public void Stop() { if (this.state == UtilityAIClientState.Stopped) { return; } AIManager.Unregister(this); this.state = UtilityAIClientState.Stopped; this.OnStop(); }
public void Start() { if (this.state != UtilityAIClientState.Stopped) { return; } AIManager.Register(this); this.state = UtilityAIClientState.Running; this.OnStart(); }
protected UtilityAIClient(Guid aiId, IContextProvider contextProvider) { Ensure.ArgumentNotNull(contextProvider, "contextProvider"); this._ai = AIManager.GetAI(aiId); if (this._ai == null) { throw new ArgumentException("Unable to load associated AI.", "aiId"); } this._contextProvider = contextProvider; this.state = UtilityAIClientState.Stopped; }
protected void JustDecompileGenerated_set_state(UtilityAIClientState value) { this.JustDecompileGenerated_state_k__BackingField = value; }