public override void LoadContent() { CustomEffect = GameScreen.Content.Load <Effect>("SpriteShader"); if (Texture == null) { Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName)); } BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.Initialize(); if (AttachedPathingNode != null) { AttachedPathingNode.Initialize(); } base.LoadContent(); }
public override void LoadContent() { if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } if (BoundingBoxRenderer == null) { BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.SpriteBatch = SpriteBatch; BoundingBoxRenderer.Initialize(); } if (ClipPlayer.Texture == null) { ClipPlayer.Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(SpriteSheetFileName)); } base.LoadContent(); }
public override void LoadContent() { if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } CustomEffect = GameScreen.Content.Load <Effect>("SpriteShader"); OnClick += OnButtonClicked; if (Texture == null) { Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName)); } BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.Initialize(); base.LoadContent(); }
public override void LoadContent() { Globals.OnSceneEvent += OnSceneEvent; if (RenderWindow == null) { RenderWindow = Globals.RenderWindow; } if (Texture == null) { Texture = Utilitys.TextureFromFile(Globals.Game.GraphicsDevice, Globals.GetDestinationTexturePath(AssetName)); } if (BoundingBoxRenderer == null) { BoundingBoxRenderer = new BoundingBoxRenderer(Game); BoundingBoxRenderer.SpriteBatch = SpriteBatch; BoundingBoxRenderer.Initialize(); } base.LoadContent(); }