} // end of UIGridPictureListElement RefreshTexture() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the arrow textures. if (leftArrow == null) { leftArrow = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\WhiteLeftArrow"); } if (rightArrow == null) { rightArrow = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\WhiteRightArrow"); } }
public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the textures. if (sliderWhite == null) { sliderWhite = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderWhite"); } if (sliderBlack == null) { sliderBlack = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderBlack"); } if (sliderBeadEnd == null) { sliderBeadEnd = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderBeadEnd"); } if (sliderBeadMiddle == null) { sliderBeadMiddle = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderBeadMiddle"); } } // end of UIGridBaseModularSliderElement LoadContent()
public static void Load(GraphicsDevice device) { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Ripple"); ShaderGlobals.RegisterEffect("Ripple", effect); effectCache.Load(effect); } if (texture == null) { texture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BullsEye1"); } if (verts == null) { verts = new DynamicVertexBuffer(device, typeof(Vertex), kMaxVerts, BufferUsage.WriteOnly); } if (indices == null) { indices = new IndexBuffer(device, typeof(Int16), kMaxIndices, BufferUsage.WriteOnly); Int16[] localIdx = new Int16[kMaxIndices]; for (int i = 0; i < kMaxTiles; ++i) { localIdx[i * 6 + 0] = (short)(i * 4 + 0); localIdx[i * 6 + 1] = (short)(i * 4 + 1); localIdx[i * 6 + 2] = (short)(i * 4 + 2); localIdx[i * 6 + 3] = (short)(i * 4 + 2); localIdx[i * 6 + 4] = (short)(i * 4 + 1); localIdx[i * 6 + 5] = (short)(i * 4 + 3); } indices.SetData <Int16>(localIdx); } }
public void LoadContent(bool immediate) { contentLoaded = true; // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the textures. if (whiteTop == null) { whiteTop = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\WhiteTop"); } if (whiteHighlight == null) { whiteHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\WhiteHighlight"); } if (blackHighlight == null) { blackHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\BlackHighlight"); } if (greenBar == null) { greenBar = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\GreenBar"); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } }
} // end of UIGrid2DDualTextureElement Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the diffuse texture. if (foreTextureName != null) { foreTexture = Boku.Programming.CardSpace.Cards.CardFaceTexture(foreTextureName); } // Load the overlay texture. if (backSelectedTexture == null) { backSelectedTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\GreenSquare"); } if (backUnselectedTexture == null) { backUnselectedTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\GreySquare"); } } // end of UIGrid2DDualTextureElement LoadContent()
} // end of UIGrid2DLEDArray Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the diffuse texture. if (diffuseTextureName != null) { diffuse = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\" + diffuseTextureName); } if (white == null) { white = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\White"); } } // end of UIGrid2DLEDArray LoadContent()
} // end of UIGrid2DTextureElement Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the diffuse texture. if (diffuseTextureName != null) { if (CardSpace) { diffuse = Boku.Programming.CardSpace.Cards.CardFaceTexture(diffuseTextureName); } else { diffuse = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\" + diffuseTextureName); } } // Load the overlay texture. if (overlayTextureName != null) { overlayTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\" + overlayTextureName); } } // end of UIGrid2DTextureElement LoadContent()
/// <summary> /// Load up anything that doesn't require a device. /// </summary> /// <param name="immediate"></param> public static void LoadContent(bool immediate) { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\ShowBudget"); ShaderGlobals.RegisterEffect("ShowBudget", effect); effectCache.Load(effect, ""); budgetTechnique = effect.Techniques["ShowBudget"]; glowTechnique = effect.Techniques["BorderGlow"]; } if (background == null) { background = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetBackground"); } if (mask == null) { mask = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetMask"); } if (glow == null) { glow = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\BudgetGlow"); } }
} // end of UIGridModularButtonElement Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the check textures. if (checkboxWhite == null) { checkboxWhite = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\CheckboxWhite"); } if (blackSquare == null) { blackSquare = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\BlackSquare"); } } // end of UIGridModularButtonElement LoadContent()
} // end of UIGridTextListElement SetValue() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the check textures. if (checkbox == null) { checkbox = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\WhiteCheckBox"); } if (checkmark == null) { checkmark = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\WhiteCheck"); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } }
internal static void LoadContent(bool immediate) { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\ScoreEffect"); ShaderGlobals.RegisterEffect("ScoreEffect", effect); } }
} // end of UtilsVertex public static void Init(GraphicsDevice device) { // Init the effect. effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Utils"); ShaderGlobals.RegisterEffect("Utils", effect); ramps = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\Ramps"); white = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\White"); } // end of Utils Init()
public void LoadContent(bool immediate) { // Init the effect. Doesn't really matter which one, just // has to be one that uses the same shared parameters. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Standard"); ShaderGlobals.RegisterEffect("Standard", effect); } } // end of UIShim RenderObj LoadContent()
} // end of SkyBox Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\SkyBox"); ShaderGlobals.RegisterEffect("SkyBox", effect); } base.LoadContent(immediate); } // end of SkyBox LoadContent()
/// <summary> /// Load up resource needed for rendering, all shared statics. /// </summary> /// <param name="immediate"></param> public static void LoadContent(bool immediate) { if (bump == null) { bump = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\DistortionWake"); } if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Standard"); ShaderGlobals.RegisterEffect("Standard", effect); effectCache.Load(effect, ""); } }
/// <summary> /// This Init function also doubles as an update function /// in case the position or size of the billboard changes. /// </summary> public void InitDeviceResources(GraphicsDevice device) { // Init the vertex buffer. if (vbuf == null) { vbuf = new VertexBuffer(device, typeof(Vertex), 4, BufferUsage.WriteOnly); // Create local vertices. Vertex[] localVerts = new Vertex[4]; { localVerts[0] = new Vertex(new Vector3(-size.X / 2.0f, size.Y / 2.0f, 0.0f), new Vector2(0, 0)); localVerts[1] = new Vertex(new Vector3(size.X / 2.0f, size.Y / 2.0f, 0.0f), new Vector2(1, 0)); localVerts[2] = new Vertex(new Vector3(size.X / 2.0f, -size.Y / 2.0f, 0.0f), new Vector2(1, 1)); localVerts[3] = new Vertex(new Vector3(-size.X / 2.0f, -size.Y / 2.0f, 0.0f), new Vector2(0, 1)); } // Copy to vertex buffer. vbuf.SetData <Vertex>(localVerts); } // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Billboard"); ShaderGlobals.RegisterEffect("Billboard", effect); effectCache.Load(effect); technique = premultipliedAlpha ? effect.Techniques["PremultipliedAlphaColorPass"] : effect.Techniques["NormalAlphaColorPass"]; } // Load the texture. if (textureFilename != null) { // First try and load it as a programming tile. texture = CardSpace.Cards.CardFaceTexture(textureFilename); // If that didn't work, treat it as an asset name. if (texture == null) { texture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + textureFilename); } } if (texture != null && size == Vector2.Zero) { UiCamera c = new UiCamera(); size.X = texture.Width / c.Dpi; // 96 DPI size.Y = texture.Height / c.Dpi; } } // end of InitDeviceResources()
public static void Load() { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Shield"); ShaderGlobals.RegisterEffect("Shield", effect); effectCache.Load(effect, ""); } if (crossTexture == null) { crossTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\Ring"); } }
} // end of UIGrid2DTextElement2 Render() #endregion #region Internal public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } } // end of UIGrid2DTextElement2 LoadContent()
public void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the background texture. if (background == null) { background = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\MessageBox\TextDialogBackground"); } } // end of TextDialog RenderObj LoadContent();
} // end of Compass Render() public void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Billboard"); ShaderGlobals.RegisterEffect("Billboard", effect); } // Load the texture. if (texture == null) { texture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\Compass"); } } // end of Compass LoadContent()
public new void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } if (backgroundTexture == null) { backgroundTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + backgroundName); } base.LoadContent(immediate); } // end of LoadContent()
internal static void LoadContent(bool immediate) { if (backTexture == null) { backTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HealthBarBack"); } if (lifeTexture == null) { lifeTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HealthBarLife"); } if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\HealthBar"); ShaderGlobals.RegisterEffect("HealthBar", effect); } }
public void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Standard"); ShaderGlobals.RegisterEffect("Standard", effect); effectCache.Load(effect, ""); } // Load the texture. if (texture == null) { texture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\Cursor3D"); } RunSimCursor.GetInstance().LoadContent(immediate); } // end of Cursor3D RenderObj LoadContent()
} // end of LoadContent() public void InitDeviceResources(GraphicsDevice device) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } if (rightStickTexture == null) { rightStickTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\RightStick"); } if (leftStickTexture == null) { leftStickTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\LeftStick"); } if (glassTileHighlight == null) { glassTileHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\GlassTileHighlight"); } if (whiteHighlight == null) { whiteHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\WhiteHighlight"); } if (blackHighlight == null) { blackHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\BlackHighlight"); } if (normalMap == null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\FlatNormalMap"); } glassTile = new Base9Grid(2.2f, 2.2f, edgeSize); descTile = new Base9Grid(6.7f, 2.2f, edgeSize); examplesTile = new Base9Grid(9.0f, 5.0f, edgeSize); BokuGame.Load(glassTile); BokuGame.Load(descTile); BokuGame.Load(examplesTile); } // end of InitDeviceResources()
} // end of ThoughtBalloonManager RemoveThoughts() public static void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\ThoughtBalloon"); ShaderGlobals.RegisterEffect("ThoughtBalloon", effect); } // Load the frame texture. if (frameTexture == null) { frameTexture = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\TextEditor\ThoughtBalloon"); } if (tutorialFocusArrow == null) { tutorialFocusArrow = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\TutorialFocusArrow"); } } // end of LoadContent()
} // end of UIGridModularCameraModeElement Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the check textures. if (white == null) { white = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderWhite"); } if (black == null) { black = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\RadioBoxBlack"); } if (middleBlack == null) { middleBlack = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\MiddleBlack"); } if (icons == null) { icons = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\CameraModeIcons"); } if (indicatorLit == null) { indicatorLit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\IndicatorLit"); } if (indicatorUnlit == null) { indicatorUnlit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\IndicatorUnlit"); } } // end of UIGridModularCameraModeElement LoadContent()
public void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } if (whiteHighlight == null) { whiteHighlight = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\HelpCard\GlassTileHighlight"); } if (greenBar == null) { greenBar = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\GreenBar"); } if (checkboxLit == null) { checkboxLit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\CheckboxLit"); } if (checkboxUnlit == null) { checkboxUnlit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\CheckboxUnlit"); } if (radioButtonLit == null) { radioButtonLit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\IndicatorLit"); } if (radioButtonUnlit == null) { radioButtonUnlit = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\IndicatorUnlit"); } // Load the normal map texture. if (normalMap == null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\FlatNormalMap"); } }
} // end of ParticleSystemManager ClearAllEmitters() public void LoadContent(bool immediate) { if (effect2d == null) { effect2d = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Particle2D"); effectCache2d.Load(effect2d); } if (effect3d == null) { effect3d = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Particle3D"); ShaderGlobals.RegisterEffect("Particel3D", effect3d); effectCache3d.Load(effect3d); } SharedEmitterManager.LoadContent(immediate); BaseSpriteEmitter.LoadContent(immediate); ExplosionEmitter.LoadContent(immediate); FlowerEmitter.LoadContent(immediate); HeartEmitter.LoadContent(immediate); SmokeEmitter.LoadContent(immediate); StarEmitter.LoadContent(immediate); SteamEmitter.LoadContent(immediate); SwearEmitter.LoadContent(immediate); WreathEmitter.LoadContent(immediate); BeamExplosionEmitter.LoadContent(immediate); BeamSmokeEmitter.LoadContent(immediate); ScanExplosionEmitter.LoadContent(immediate); ScanSmokeEmitter.LoadContent(immediate); RoverScanExplosionEmitter.LoadContent(immediate); RoverScanSmokeEmitter.LoadContent(immediate); InspectExplosionEmitter.LoadContent(immediate); InspectSmokeEmitter.LoadContent(immediate); FanEmitter.LoadContent(immediate); InkEmitter.LoadContent(immediate); } // end of ParticleSystemManager LoadContent()
} // end of UIGridModularCheckboxElement Render() public override void LoadContent(bool immediate) { // Init the effect. if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\UI2D"); ShaderGlobals.RegisterEffect("UI2D", effect); } // Load the normal map texture. if (normalMapName != null) { normalMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\UI2D\" + normalMapName); } // Load the background textures. if (nextLevelWhite == null) { nextLevelWhite = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\SliderWhite"); } if (nextLevelMiddleBlack == null) { nextLevelMiddleBlack = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\MiddleBlack"); } if (nextLevelBlack == null) { nextLevelBlack = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\RadioBoxBlack"); } if (nextLevelNone == null) { nextLevelNone = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + @"Textures\GridElements\NoNextLevel"); } } // end of UIGridModularCheckboxElement LoadContent()
private void LoadWaterEffect() { if (effect == null) { effect = BokuGame.Load <Effect>(BokuGame.Settings.MediaPath + @"Shaders\Water"); ShaderGlobals.RegisterEffect("Water", effect); effectCache.Load(effect); } if (bumpMap == null) { if ((bumpMapFilename == null) || (bumpMapFilename == "")) { bumpMapFilename = @"Textures\Terrain\WaterNormalMap"; } bumpMap = BokuGame.Load <Texture2D>(BokuGame.Settings.MediaPath + bumpMapFilename); } SetupToNeighbors(); SetupUvToOffsets(); SetupNeighborSelects(); SetupBumpToWorlds(); SetupLightDirs(); }