当前位置: 首页>>代码示例>>C#>>正文


C# ObjectCreator.Create方法代码示例

本文整理汇总了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.Create方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCreator.Create方法的具体用法?C# ObjectCreator.Create怎么用?C# ObjectCreator.Create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WinterLeaf.Engine.Classes.View.Creators.ObjectCreator的用法示例。


在下文中一共展示了ObjectCreator.Create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: initialize_CS

        public static void initialize_CS()
        {
            ObjectCreator tch = new ObjectCreator("ShaderData", "AL_ShadowVisualizeShader");
            tch["DXVertexShaderFile"] = "shaders/common/guiMaterialV.hlsl";
            tch["DXPixelShaderFile"] = "shaders/common/lighting/advanced/dbgShadowVisualizeP.hlsl";

            tch["OGLVertexShaderFile"] = "shaders/common/gl/guiMaterialV.glsl";
            tch["OGLPixelShaderFile"] = "shaders/common/lighting/advanced/gl/dbgShadowVisualizeP.glsl";

            tch["pixVersion"] = 2.0;
            tch.Create();

            tch = new ObjectCreator("CustomMaterial", "AL_ShadowVisualizeMaterial");
            tch["shader"] = "AL_ShadowVisualizeShader";
            tch["stateBlock"] = "AL_DepthVisualizeState";

            tch["sampler[\"shadowMap\"]"] = "#AL_ShadowVizTexture";
            tch["sampler[\"depthViz\"]"] = "core/scripts/client/lighting/advanced/depthviz";

            tch["pixVersion"] = 2.0;
            tch.Create();

            SingletonCreator ts = new SingletonCreator("GuiControlProfile", "AL_ShadowLabelTextProfile");
            ts["fontColor"] = "0 0 0";
            ts["autoSizeWidth"] = true;
            ts["autoSizeHeight"] = true;
            ts["justify"] = "left";
            ts["fontSize"] = 14;
            ts.Create();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:30,代码来源:shadowViz.cs

示例2: onThrow

        public override int onThrow(ShapeBase user, int amount)
        {
            if (amount == 0)
                amount = 1;

            if (this["maxInventory"] != string.Empty)
                {
                if (amount > this["maxInventory"].AsInt())
                    amount = this["maxInventory"].AsInt();
                }

            if (!amount.AsBool())
                return 0;

            user.decInventory(this, amount);
            //ShapeBaseShapeBaseDecInventory(player, datablock, amount);

            // Construct the actual object in the world, and add it to
            // the mission group so it's cleaned up when the mission is
            // done.  The object is given a random z rotation.
            ObjectCreator tch = new ObjectCreator("Item", string.Empty);
            tch["datablock"] = this;
            tch["rotation"] = "0 0 1 " + (new Random().Next(0, 360));
            tch["count"] = amount;

            Item item = tch.Create();

            ((SimSet) "MissionGroup").pushToBack(item);

            item.SchedulePop();

            return item;
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:33,代码来源:ItemData.cs

示例3: initializeRiverEditor

        public static void initializeRiverEditor()
        {
            Omni.self.Print(" % - Initializing River Editor");
            gui.RiverEditor.initialize();
            RiverEditorGui.initialize();
            RiverEditorToolbar.initialize();
            // Add ourselves to EditorGui, where all the other tools reside
            RiverEditorGui riverEditorGui = "RiverEditorGui";

            riverEditorGui.setVisible(false);

            RiverEditorToolbar oRiverEditorToolbar = "RiverEditorToolbar";

            oRiverEditorToolbar.setVisible(false);
            ((GuiWindowCollapseCtrl) "RiverEditorOptionsWindow").setVisible(false);
            GuiWindowCollapseCtrl RiverEditorTreeWindow = "RiverEditorTreeWindow";
            RiverEditorTreeWindow.setVisible(false);

            EditorGui EditorGui = "EditorGui";

            EditorGui.add("RiverEditorGui");
            EditorGui.add("RiverEditorToolbar");
            EditorGui.add("RiverEditorOptionsWindow");
            EditorGui.add("RiverEditorTreeWindow");

            ObjectCreator oRiverEditorPlugin = new ObjectCreator("ScriptObject", "RiverEditorPlugin", typeof (RiverEditorPlugin));
            oRiverEditorPlugin["editorGui"] = "RiverEditorGui";
            oRiverEditorPlugin.Create();

            RiverEditorPlugin RiverEditorPlugin = "RiverEditorPlugin";

            RiverEditorPlugin.initialize();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:33,代码来源:main.cs

示例4: initialize

        public void initialize()
        {
            ObjectCreator oc_Newobject3 = new ObjectCreator("SimSet", "ForestTools");

            ObjectCreator oc_Newobject2 = new ObjectCreator("ForestBrushTool");
            oc_Newobject2["internalName"] = "BrushTool";
            oc_Newobject2["toolTip"] = "Paint Tool";
            oc_Newobject2["buttonImage"] = "tools/forest/images/brushTool";

            oc_Newobject3["#Newobject2"] = oc_Newobject2;

            ObjectCreator oc_Newobject1 = new ObjectCreator("ForestSelectionTool");
            oc_Newobject1["internalName"] = "SelectionTool";
            oc_Newobject1["toolTip"] = "Selection Tool";
            oc_Newobject1["buttonImage"] = "tools/forest/images/selectionTool";
            oc_Newobject3["#Newobject1"] = oc_Newobject1;

            oc_Newobject3.Create();

            ActionMap map = new ObjectCreator("ActionMap").Create();
            map.bindCmd("keyboard", "1", "ForestEditorSelectModeBtn.performClick();", ""); // Select
            map.bindCmd("keyboard", "2", "ForestEditorMoveModeBtn.performClick();", ""); // Move
            map.bindCmd("keyboard", "3", "ForestEditorRotateModeBtn.performClick();", ""); // Rotate
            map.bindCmd("keyboard", "4", "ForestEditorScaleModeBtn.performClick();", ""); // Scale
            map.bindCmd("keyboard", "5", "ForestEditorPaintModeBtn.performClick();", ""); // Paint
            map.bindCmd("keyboard", "6", "ForestEditorEraseModeBtn.performClick();", ""); // Erase
            map.bindCmd("keyboard", "7", "ForestEditorEraseSelectedModeBtn.performClick();", ""); // EraseSelected   
            map.bindCmd("keyboard", "8", "ForestEditorDropToGroundModeBtn.performClick();", ""); // DropTheBeat
            //%map.bindCmd( keyboard, "backspace", "ForestEditorGui.onDeleteKey();", "" );
            //%map.bindCmd( keyboard, "delete", "ForestEditorGui.onDeleteKey();", "" );   
            this.map = map;
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:32,代码来源:ForestEditorPlugin.cs

示例5: initializeDatablockEditor

        public static void initializeDatablockEditor()
        {
            Omni.self.Print(" % Initializing Datablock Editor");
            gui.CodeBehind.DatablockEditor.initialize();
            DatablockEditorTreeWindow.initialize();
            DatablockEditorInspectorWindow.initialize();
            DatablockEditorCreatePrompt.initialize();

            // Add ourselves to EditorGui, where all the other tools reside
            DatablockEditorInspectorWindow oDatablockEditorInspectorWindow = "DatablockEditorInspectorWindow";

            oDatablockEditorInspectorWindow.setVisible(false);
            DatablockEditorTreeWindow oDatablockEditorTreeWindow = "DatablockEditorTreeWindow";
            oDatablockEditorTreeWindow.setVisible(false);
            EditorGui EditorGui = "EditorGui";
            EditorGui.add("DatablockEditorInspectorWindow");
            EditorGui.add("DatablockEditorTreeWindow");

            ObjectCreator o = new ObjectCreator("ScriptObject", "DatablockEditorPlugin", typeof (DatablockEditorPlugin));
            o["editorGui"] = "EWorldEditor";
            o.Create();
            DatablockEditorPlugin p = "DatablockEditorPlugin";

            p.initialize();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:25,代码来源:main.cs

示例6: onAdd

        public override void onAdd()
        {
            this.createMenuBar();

            ObjectCreator oc = new ObjectCreator("GuiPanel");
            oc["internalName"] = "DocumentContainer";

            GuiPanel panel = oc.Create();

            this.setContent(panel);

            int xOffset = 20;
            int yOffset = 20;

            for (int i = 0; i < 10; i++)
                {
                ObjectCreator oc1 = new ObjectCreator("GuiWindowCtrl");
                oc["extent"] = "200 100";
                oc["position"] = xOffset + ' ' + yOffset;

                GuiWindowCtrl window = oc1.Create();
                panel.add(window);

                xOffset += 30;
                yOffset += 30;
                }
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:27,代码来源:BaseEditorCanvas.ed.cs

示例7: initializeDecalEditor

        public static void initializeDecalEditor()
        {
            Omni.self.Print(" % - Initializing Decal Editor");
            omni.sGlobal["$decalDataFile"] = "art/decals/managedDecalData.cs";
            gui.DecalEditorGui.initialize();

            // Add ourselves to EditorGui, where all the other tools reside
            DecalEditorGui DecalEditorGui = "DecalEditorGui";

            DecalEditorGui.setVisible(false);

            DecalEditorGui.DecalPreviewWindow DecalPreviewWindow = "DecalPreviewWindow";

            DecalPreviewWindow.setVisible(false);
            DecalEditorGui.DecalEditorWindow DecalEditorWindow = "DecalEditorWindow";
            DecalEditorWindow.setVisible(false);

            EditorGui EditorGui = "EditorGui";
            EditorGui.add(DecalEditorGui);
            EditorGui.add(DecalEditorWindow);
            EditorGui.add(DecalPreviewWindow);

            DecalEditorGui.DecalEditorTabBook DecalEditorTabBook = "DecalEditorTabBook";
            DecalEditorTabBook.selectPage(0);

            ObjectCreator oc = new ObjectCreator("ScriptObject", "DecalEditorPlugin", typeof (DecalEditorPlugin));
            oc["editorGui"] = "DecalEditorGui";
            oc.Create();

            DecalEditorPlugin DecalEditorPlugin = "DecalEditorPlugin";

            DecalEditorPlugin.initialize();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:33,代码来源:main.cs

示例8: initialize

        public static void initialize()
        {
            #region GameTSCtrl (HudlessPlayGui)        oc_Newobject1

            ObjectCreator oc_Newobject1 = new ObjectCreator("GameTSCtrl", "HudlessPlayGui", typeof (hudlessGui));
            oc_Newobject1["canSaveDynamicFields"] = "1";
            oc_Newobject1["isContainer"] = "1";
            oc_Newobject1["Profile"] = "GuiContentProfile";
            oc_Newobject1["HorizSizing"] = "right";
            oc_Newobject1["VertSizing"] = "bottom";
            oc_Newobject1["position"] = "0 0";
            oc_Newobject1["Extent"] = "1024 768";
            oc_Newobject1["MinExtent"] = "8 8";
            oc_Newobject1["canSave"] = "1";
            oc_Newobject1["Visible"] = "1";
            oc_Newobject1["tooltipprofile"] = "GuiToolTipProfile";
            oc_Newobject1["hovertime"] = "1000";
            oc_Newobject1["Margin"] = "0 0 0 0";
            oc_Newobject1["Padding"] = "0 0 0 0";
            oc_Newobject1["AnchorTop"] = "1";
            oc_Newobject1["AnchorBottom"] = "0";
            oc_Newobject1["AnchorLeft"] = "1";
            oc_Newobject1["AnchorRight"] = "0";
            oc_Newobject1["cameraZRot"] = "0";
            oc_Newobject1["forceFOV"] = "0";
            oc_Newobject1["Enabled"] = "1";
            oc_Newobject1["helpTag"] = "0";
            oc_Newobject1["noCursor"] = "1";

            #endregion

            oc_Newobject1.Create();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:33,代码来源:hudlessGui.gui.cs

示例9: onRightMouseUp

        public override void onRightMouseUp(GuiControl ctrl)
        {
            int fontColorPos, backgroundColorPos, fillColorPos, fontSizePos, lockPos, winSettingsPos, setTitlePos, bitmapPos;
            GuiCanvas Canvas = "Canvas";

            ObjectCreator popupCreator = new ObjectCreator("PopupMenu", "", typeof (MenuBuilder));

            popupCreator["isPopup"] = true.AsString();

            popupCreator["object"] = "-1";

            MenuBuilder popup = popupCreator.Create();

            popup.removeAllItems();
            popup["object"] = ctrl;

            if (ctrl.getName() != "")
                popup.appendItem(ctrl.getName() + '\t' + "" + '\t' + "");
            else
                popup.appendItem(ctrl.getClassName() + '\t' + "" + '\t' + "");

            popup.enableItem(0, false);

            if (ctrl.lockControl)
                {
                lockPos = popup.appendItem("Locked" + '\t' + "" + '\t' + ctrl + ".setControlLock(!" + ctrl + ".getControlLock());");
                popup.checkItem(lockPos, ctrl.getControlLock());
                }

            if (ctrl.contextFontColor)
                fontColorPos = popup.appendItem("Font Color..." + '\t' + "" + '\t' + "getColorI(\"" + ctrl.controlFontColor.AsString() + "\", \"" + ctrl + ".setControlFontColor\", " + ctrl.getRoot() + ", \"" + ctrl + ".setControlFontColor\", \"" + ctrl + ".setControlFontColor\" );");

            if (ctrl.contextBackColor)
                backgroundColorPos = popup.appendItem("Background Color..." + '\t' + "" + '\t' + "IngameContext.transparentCheck(" + ctrl + ", \"backColor\");");

            if (ctrl.contextFillColor)
                fillColorPos = popup.appendItem("Fill Color..." + '\t' + "" + '\t' + "IngameContext.transparentCheck(" + ctrl + ", \"fillColor\");");

            if (ctrl.contextFontSize)
                fontSizePos = popup.appendItem("Font Size..." + '\t' + "" + '\t' + "ChangeFontSize.loadDialog(" + ctrl + ");");

            if (ctrl.windowSettings)
                winSettingsPos = popup.appendItem("Window Settings" + '\t' + "" + '\t' + "WindowSettings.loadDialog(" + ctrl + ");");

            if (ctrl.isMemberOfClass("GuiBitmapCtrl"))
                {
                if (((GuiControl) popup["object"])["setBitmap"].AsBool())
                    bitmapPos = popup.appendItem("Set Bitmap..." + '\t' + "" + '\t' + "getLoadFilename( \"All Image Files|*.png;*.jpeg;*.jpg;*.tga;*.jng;*.mng;*.gif;*.bmp;*.dds|png|*.png|jpeg|*.jpeg|jpg|*.jpg|tga|*.tga|jng|*.jng|mng|*.mng|gif|*.gif|bmp|*.bmp|dds|*.dds\"," + ctrl + "\".setBitmap\", \"\" );");
                }

            if (ctrl.isMemberOfClass("GuiWindowCtrl"))
                {
                if (((GuiControl) popup["object"])["setTitle"].AsBool())
                    setTitlePos = popup.appendItem("Set Title..." + '\t' + "" + '\t' + "SetTitle.loadDialog(" + ctrl + ");");
                }

            popup.showPopup(Canvas);
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:58,代码来源:InGameContext.cs

示例10: initializeInGameEditor

 public static void initializeInGameEditor()
 {
     Omni.self.Print(" % - Initializing In-game GUI Editor");
     SetTitle.initialize();
     WindowSettings.initialize();
     ChangeFontSize.initialize();
     ObjectCreator oIngameContext = new ObjectCreator("GuiControl", "IngameContext, IngameGuiGroup", typeof (InGameContext));
     oIngameContext.Create();
 }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:9,代码来源:main.cs

示例11: constructRSSHeadline

        public static string constructRSSHeadline(string headline, string link)
        {
            ObjectCreator oc = new ObjectCreator("ScriptObject", "", typeof (RSSHeadline));
            oc["_headline"] = headline;
            oc["_link"] = link;

            RSSHeadline ret = oc.Create();

            return ret;
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:10,代码来源:RSSStructs.ed.cs

示例12: intialize

        public static void intialize()
        {
            //-----------------------------------------------------------------------------
            // Anim flag settings - must match material.h
            // These cannot be enumed through script becuase it cannot
            // handle the "|" operation for combining them together
            // ie. Scroll | Wave does not work.
            //-----------------------------------------------------------------------------
            omni.iGlobal["$scroll"] = 1;
            omni.iGlobal["$rotate"] = 2;
            omni.iGlobal["$wave"] = 4;
            omni.iGlobal["$scale"] = 8;
            omni.iGlobal["$sequence"] = 16;

            // Common stateblock definitions
            ObjectCreator oc = new ObjectCreator("GFXSamplerStateData", "SamplerClampLinear");
            oc["textureColorOp"] = "GFXTOPModulate";
            oc["addressModeU"] = "GFXAddressClamp";
            oc["addressModeV"] = "GFXAddressClamp";
            oc["addressModeW"] = "GFXAddressClamp";
            oc["magFilter"] = "GFXTextureFilterLinear";
            oc["minFilter"] = "GFXTextureFilterLinear";
            oc["mipFilter"] = "GFXTextureFilterLinear";
            oc.Create();

            oc = new ObjectCreator("GFXSamplerStateData", "SamplerClampPoint");
            oc["textureColorOp"] = "GFXTOPModulate";
            oc["addressModeU"] = "GFXAddressClamp";
            oc["addressModeV"] = "GFXAddressClamp";
            oc["addressModeW"] = "GFXAddressClamp";
            oc["magFilter"] = "GFXTextureFilterPoint";
            oc["minFilter"] = "GFXTextureFilterPoint";
            oc["mipFilter"] = "GFXTextureFilterPoint";
            oc.Create();

            oc = new ObjectCreator("GFXSamplerStateData", "SamplerWrapLinear");
            oc["textureColorOp"] = "GFXTOPModulate";
            oc["addressModeU"] = "GFXTextureAddressWrap";
            oc["addressModeV"] = "GFXTextureAddressWrap";
            oc["addressModeW"] = "GFXTextureAddressWrap";
            oc["magFilter"] = "GFXTextureFilterLinear";
            oc["minFilter"] = "GFXTextureFilterLinear";
            oc["mipFilter"] = "GFXTextureFilterLinear";
            oc.Create();

            oc = new ObjectCreator("GFXSamplerStateData", "SamplerWrapPoint");
            oc["textureColorOp"] = "GFXTOPModulate";
            oc["addressModeU"] = "GFXTextureAddressWrap";
            oc["addressModeV"] = "GFXTextureAddressWrap";
            oc["addressModeW"] = "GFXTextureAddressWrap";
            oc["magFilter"] = "GFXTextureFilterPoint";
            oc["minFilter"] = "GFXTextureFilterPoint";
            oc["mipFilter"] = "GFXTextureFilterPoint";
            oc.Create();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:55,代码来源:commonMaterialData.cs

示例13: initialize

        public static void initialize()
        {
            ObjectCreator tch = new ObjectCreator("ShaderData", "BlurDepthShader");
            tch["DXVertexShaderFile"] = "shaders/common/lighting/shadowMap/boxFilterV.hlsl";
            tch["DXPixelShaderFile"] = "shaders/common/lighting/shadowMap/boxFilterP.hlsl";

            tch["OGLVertexShaderFile"] = "shaders/common/lighting/shadowMap/gl/boxFilterV.glsl";
            tch["OGLPixelShaderFile"] = "shaders/common/lighting/shadowMap/gl/boxFilterP.glsl";
            tch["pixVersion"] = 2.0;
            tch.Create();
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:11,代码来源:init.cs

示例14: create

        public string create(string treeView)
        {
            omni.Util.pushInstantGroup();
            ObjectCreator undoObject = new ObjectCreator("UndoScriptAction", "", typeof (UndoActionReparentObjects));
            //undoObject["class"] = "UndoActionReparentObjects";
            undoObject["numObjects"] = "0";
            undoObject["treeView"] = treeView;
            UndoActionReparentObjects action = undoObject.Create();
            omni.Util.popInstantGroup();

            return action;
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:12,代码来源:UndoActionReparentObjects.ed.cs

示例15: respawnTurret

        public virtual SceneObject respawnTurret(SimDataBlock datablock, string classname, TransformF transform, string isstatic, string respawn)
        {
            ObjectCreator tch = new ObjectCreator(classname);
            tch["datablock"] = datablock;
            tch["static"] = isstatic;
            tch["respawn"] = respawn;

            SceneObject turret = tch.Create();

            turret.setTransform(transform);
            ((SimGroup) "MissionGroup").add(turret);
            return turret;
        }
开发者ID:souxiaosou,项目名称:OmniEngine.Net,代码行数:13,代码来源:SimGroup.cs


注:本文中的WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.Create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。