public override void Create() { #if EDITOR && WINDOWS if (ParentLevel.LevelForEditing) { HierarchyHolder = new FormHolder(); HierarchyHolder.AddForm(ChildHierarchy = new Hierarchy(new Vector2(0), this)); ChildHierarchy.AddHierarchyObject(this); } #endif #if EDITOR UpdateTime = new StopwatchWrapper("UpdateTime"); DrawTime = new StopwatchWrapper("DrawTime"); #endif WorldViewerChildren = AddTag(GameObjectTag.WorldViewer); EffectDirectory = new StringValue("Effect Directory:", "Effects/"); ModelDirectory = new StringValue("Model Directory:", "Models/"); TextureDirectory = new StringValue("Texture Directory", "Textures/"); #if EDITOR && WINDOWS if (ParentLevel.LevelForEditing) { AddRightClickEvent("Set as Starting Scene", SetAsStart); } #endif base.Create(); }
public override void Create() { #if EDITOR PreDrawTime = new StopwatchWrapper("PredrawTime"); GBufferTime = new StopwatchWrapper("GBufferTime"); LightmapTime = new StopwatchWrapper("LightMapTime"); CompositeTime = new StopwatchWrapper("CompositeTime"); #endif AddWindowForm(deferredControls = new DeferredControls()); GBufferChildren = AddTag(GameObjectTag._3DDeferredGBuffer); OverLightingChildren = AddTag(GameObjectTag._3DDeferredOverLighting); WorldLightingChildren = AddTag(GameObjectTag._3DDeferredWorldLighting); ForwardChildren = AddTag(GameObjectTag._3DForward); DepthOverChildren = AddTag(GameObjectTag._3DDepthOver); UpdateChildren = AddTag(GameObjectTag.Update); SolidChildren = AddTag(GameObjectTag._3DSolid); ShadowChildren = AddTag(GameObjectTag._3DShadow); PreDrawChildren = AddTag(GameObjectTag._3DPreDraw); BackgroundChildren = AddTag(GameObjectTag._3DBackground); Load(); base.Create(); }
public static void Load() { #if EDITOR RenderTime = new StopwatchWrapper("RenderTime", false); #endif BasicFont = Game1.content.Load <SpriteFont>("Fonts/BasicFont"); BlankTexture = Game1.content.Load <Texture2D>("Textures/blank"); TransparentTexture = Game1.content.Load <Texture2D>("Editor/Transparent"); WhiteEffectHolder = (_3DEffect) new _3DEffect().Create("Effects/WhiteEffect"); }
public StopwatchWrapper Add(StopwatchWrapper s) { Watches.AddLast(s); return(s); }