// MW:TODO refactor bleh private static IMyDecoratorLogic GetDecoratorLogic(MyObjectBuilder_BehaviorTreeDecoratorNode.Logic logicData) { if (logicData is MyObjectBuilder_BehaviorTreeDecoratorNode.TimerLogic) return new MyBehaviorTreeDecoratorTimerLogic(); else if (logicData is MyObjectBuilder_BehaviorTreeDecoratorNode.CounterLogic) return new MyBehaviorTreeDecoratorCounterLogic(); else Debug.Fail("Unsupported type"); return null; }
public void Construct(MyObjectBuilder_BehaviorTreeDecoratorNode.Logic logicData) { var counterLogic = logicData as MyObjectBuilder_BehaviorTreeDecoratorNode.CounterLogic; CounterLimit = counterLogic.Count; }
public void Construct(MyObjectBuilder_BehaviorTreeDecoratorNode.Logic logicData) { var timerLogic = logicData as MyObjectBuilder_BehaviorTreeDecoratorNode.TimerLogic; TimeInMs = timerLogic.TimeInMs; }