예제 #1
0
 public override void Preparation(MHEngine engine)
 {
     // Prepare the ingredients first if they are initially active or are initially available programs.
     for (int i = 0; i < m_Items.Size; i++)
     {
         MHIngredient pIngredient = m_Items.GetAt(i);
         if (pIngredient.InitiallyActive() || pIngredient.InitiallyAvailable())
         {
             pIngredient.Preparation(engine);
         }
     }
     base.Preparation(engine); // Prepare the root object and send the IsAvailable event.
 }
예제 #2
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.
 }