Beispiel #1
0
 public override void Deactivation(MHEngine engine)
 {
     if (!RunningStatus)
     {
         return;
     }
     // Run any close-down actions.
     engine.AddActions(m_CloseDown);
     engine.RunActions();
     base.Deactivation(engine);
 }
Beispiel #2
0
 public override void Activation(MHEngine engine)
 {
     if (RunningStatus)
     {
         return;
     }
     base.Activation(engine);
     if (m_fRestarting)   // Set by Quit
     {
         engine.AddActions(m_OnRestart);
         engine.RunActions();
     }
     engine.EventTriggered(this, EventIsRunning);
 }
Beispiel #3
0
 public override void Activation(MHEngine engine)
 {
     if (RunningStatus)
     {
         return;
     }
     base.Activation(engine);
     // Run any start-up actions.
     engine.AddActions(m_StartUp);
     engine.RunActions();
     // Activate the ingredients in order.
     for (int i = 0; i < m_Items.Size; i++)
     {
         MHIngredient pIngredient = m_Items.GetAt(i);
         if (pIngredient.InitiallyActive())
         {
             pIngredient.Activation(engine);
         }
     }
     m_fRunning = true;
     // Record the time here.  This is the basis for absolute times.
     m_StartTime = MHTimer.getCurrentTimeSpan();
     // Don't generate IsRunning here - that's done by the sub-classes.
 }