Пример #1
0
        /// <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();
        }
Пример #2
0
 /// <summary>
 /// Allow the participating objects to update themselves in every tick
 /// </summary>
 public void Tick()
 {
     SoS_Object.RaiseTick();
 }
Пример #3
0
 /// <summary>
 /// Reset all event handlers (overrides the base method)
 /// </summary>
 public static new void ResetEventHandler()
 {
     MessageReceived = null;
     SoS_Object.ResetEventHandler();
 }