public void PostInit(WidgetArgs args) { if (Logic == null) { return; } args["widget"] = this; LogicObject = Game.modData.ObjectCreator.CreateObject <object>(Logic, args); args.Remove("widget"); }
public void PostInit(WidgetArgs args) { if (!Logic.Any()) { return; } args["widget"] = this; LogicObjects = Logic.Select(l => Game.ModData.ObjectCreator.CreateObject <ChromeLogic>(l, args)) .ToArray(); args.Remove("widget"); }
public void PostInit(WidgetArgs args) { if (Logic == null) { return; } args["widget"] = this; LogicObject = Game.modData.ObjectCreator.CreateObject <object>(Logic, args); var iwd = LogicObject as ILogicWithInit; if (iwd != null) { iwd.Init(); } args.Remove("widget"); }