public void CreateTrigger(StateMachine sm) { if (null != Condition) { var trigger = new Trigger(Event, Condition); trigger.AddEffects(Effects); sm.AddTrigger(trigger); } else if (Effects.Any()) { var trigger = new Trigger(Event, new AnyCondition()); trigger.AddEffects(Effects); sm.AddTrigger(trigger); } }