public virtual MyObjectBuilder_MissionTriggers GetObjectBuilder()
 {
     MyObjectBuilder_MissionTriggers ob= new MyObjectBuilder_MissionTriggers();
     foreach (var trigger in m_winTriggers)
         ob.WinTriggers.Add(trigger.GetObjectBuilder());
     foreach (var trigger in m_loseTriggers)
         ob.LoseTriggers.Add(trigger.GetObjectBuilder());
     ob.message = Message;
     ob.Won = Won;
     ob.Lost = Lost;
     return ob;
 }
 public MyMissionTriggers(MyObjectBuilder_MissionTriggers builder)
 {
     Init(builder);
 }
 public void Init(MyObjectBuilder_MissionTriggers builder)
 {
     foreach (var triggerBuilder in builder.WinTriggers)
         m_winTriggers.Add(TriggerFactory.CreateInstance(triggerBuilder));
     foreach (var triggerBuilder in builder.LoseTriggers)
         m_loseTriggers.Add(TriggerFactory.CreateInstance(triggerBuilder));
     Message = builder.message;
     Won = builder.Won;
     Lost = builder.Lost;
     Debug.Assert(!(Won && Lost), "Triggers: won&&lost should not happen");
     if (Won)
         IsMsgWinning = true;
 }
 public void Init(MyObjectBuilder_MissionTriggers builder)
 {
     foreach (var triggerBuilder in builder.WinTriggers)
         m_winTriggers.Add(TriggerFactory.CreateInstance(triggerBuilder));
     foreach (var triggerBuilder in builder.LoseTriggers)
         m_loseTriggers.Add(TriggerFactory.CreateInstance(triggerBuilder));
 }