예제 #1
0
파일: Widget.cs 프로젝트: watsoncui/OpenRA
        public void PostInit(WidgetArgs args)
        {
            if (Logic == null)
            {
                return;
            }

            args["widget"] = this;

            LogicObject = Game.modData.ObjectCreator.CreateObject <object>(Logic, args);

            args.Remove("widget");
        }
예제 #2
0
        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");
        }
예제 #3
0
파일: Widget.cs 프로젝트: neviklink/OpenRA
        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");
        }