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)); } }
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; } }