/// <summary> /// A private method for initializing simulator /// </summary> private void InitializeSimulator() { // Reset all event handlers for environmental objects & agents on previous simulator Agent.ResetEventHandler(); SoS_Object.ResetEventHandler(); // Keep in track of simulation input using MonitorAgent _monitorAgent = new MonitorAgent(this); _monitorAgent.OnTextUpdate += MonitorAgent_OnTextUpdate; _monitorAgent.OnSimulationFinished += MonitorAgent_OnSimulationFinished; // Initialize the derived environmental objects & agents Initialize(); }
/// <summary> /// Allow the participating objects to update themselves in every tick /// </summary> public void Tick() { SoS_Object.RaiseTick(); }
/// <summary> /// Reset all event handlers (overrides the base method) /// </summary> public static new void ResetEventHandler() { MessageReceived = null; SoS_Object.ResetEventHandler(); }