예제 #1
0
 private void StartCheckCodes()
 {
     m_CodeMechine.Clear();
     m_CodeMechine.AddCodes(this, m_Codes);
     m_CodeMechine.StartCheckCodes();
     DoState = CheckCodeState;
 }
 /// <summary>
 /// Start checking stratagem codes.
 /// </summary>
 /// <returns>Was there are any stratagems in the contorller ?</returns>
 public bool StartCheckCodes()
 {
     m_SoundManager.PlayOnce(2000);
     m_CheckCodesMechine.Clear();
     foreach (Stratagem s in m_Stratagems)
     {
         if (s.State == Stratagem.eState.Idle && !s.IsCooling && !s.IsOutOfUses)
         {
             m_CheckCodesMechine.AddCodes(s, s.Info.Codes);
         }
     }
     m_CheckCodesMechine.StartCheckCodes();
     return(true);
 }