public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch sB, GraphicsDeviceManager gM, bool drawHUD) { sB.Begin(); //background.Draw(sB, Vector2.Zero, managers); backgrounds.DrawBackgrounds(sB, Vector2.Zero); backgrounds.Drawforegrounds(sB, Vector2.Zero); textures.DrawString(sB, red, redPos, Color.Red, TextureManager.FontSizes.small, true); mustachio.Draw(sB, new Vector2(0, 0), managers); textures.DrawString(sB, blue, bluePos, Color.Blue, TextureManager.FontSizes.small, true); aqueos.Draw(sB, new Vector2(0, 0), managers); textures.DrawString(sB, green, greenPos, Color.Green, TextureManager.FontSizes.small, true); terron.Draw(sB, new Vector2(0, 0), managers); textures.DrawString(sB, yellow, yellowPos, Color.Yellow, TextureManager.FontSizes.small, true); dian.Draw(sB, new Vector2(0, 0), managers); textures.DrawString(sB, nextGame.GetName(), new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 8), Color.White, TextureManager.FontSizes.small, true); textures.DrawString(sB, on, new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 8 + 32), Color.White, TextureManager.FontSizes.small, true); textures.DrawString(sB, mapName, new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 8 + 64), Color.White, TextureManager.FontSizes.small, true); textures.DrawString(sB, nextGame.GetSummary(), new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 8 + 192), Color.White, TextureManager.FontSizes.small, true); textures.DrawString(sB, ((timer <= beginTime) ? "" : (int)Math.Ceiling(timer) + ""), new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 8 + 320), Color.White, TextureManager.FontSizes.big, true); textures.DrawString(sB, tipText, new Vector2(DEFAUT_SCREEN_SIZE.X / 2, DEFAUT_SCREEN_SIZE.Y / 2 + 230), Color.White, TextureManager.FontSizes.small, true); sB.End(); }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch) { _spritebatch.Begin(); this.m_lp_extractor.Draw(_spritebatch); base.Draw(_spritebatch); _spritebatch.End(); }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch SB) { SB.Begin(); CResourceManager.GetInstance().GetResource(IDResource.BLACK).Draw(SB); CResourceManager.GetInstance().GetResource(IDResource.INTRO_1).Draw(SB); CResourceManager.GetInstance().GetResource(IDResource.INTRO_2).Draw(SB); SB.End(); base.Draw(SB); }
internal override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) { spriteBatch.Begin(); NewGame.Draw(this, spriteBatch); ExitGame.Draw(this, spriteBatch); spriteBatch.End(); }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, InventoryItem item, bool selected) { base.Draw(spriteBatch, item, selected); spriteBatch.Begin(); Graphics.DrawString(spriteBatch, "Fuel", new Vector2(base.X + 196f, base.Y + 130f), _textColor); spriteBatch.End(); }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch) { if (this.IsShow == false) { return; } _spritebatch.Begin(); base.Draw(_spritebatch); _spritebatch.End(); }
public void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch sb) { if (!Hidden) { sb.End(); sb.Begin(); sb.DrawString(_theme.Font, _text, GetTotalScreenPosition, LabelColor); sb.End(); } }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch SB) { SB.Begin(); CResourceManager.GetInstance().GetResource(IDResource.OPTION).Draw(SB); for (int i = 0; i < ListButtons.Count; i++) { ListButtons[i].Draw(SB); } CResourceManager.GetInstance().GetResource(IDResource.ICON).Draw(SB); SB.End(); base.Draw(SB); }
public override void draw(Microsoft.Xna.Framework.Graphics.SpriteBatch sb) { entityManager.handleEvents(entities.ToArray()); entityManager.animateEntities(entities.ToArray()); sb.Begin(); sb.Draw(bgTexture, calculateShift(), null, Color.White); if (navDebug) { navStuff.DebugDraw(sb); } entityManager.drawEntities(sb, entities.ToArray()); entityManager.player.draw(sb); sb.End(); }
public void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch) { if (this.m_numsprite.IsShow == false) { return; } //base.Draw(_spritebatch); _spritebatch.Begin(); this.Sprite.CurFrameW = 10; this.Sprite.Position = this.m_position - new Vector2(this.Sprite.Frame.Width, 0); this.Sprite.Draw(_spritebatch); this.Sprite.Position = this.m_position; _spritebatch.End(); m_numsprite.Draw(_spritebatch); }
public override void Draw(GameTime gtime, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) { currentLevel.Draw(gtime, spriteBatch); float barLevel = currentLevel.Player.GetRecharge(); float yBase = 600; float barHeight = 100; if (barLevel != 1f) { spriteBatch.Begin(); spriteBatch.Draw(ResourceManager.Resources["pixel"], new Rectangle(50, (int)(yBase - barHeight * barLevel), 20, (int)(barHeight * barLevel)), Color.White); spriteBatch.End(); } }
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch _spritebatch) { _spritebatch.Begin(); for (int i = 0; i < m_s_number.Length; i++) { this.Sprite.CurFrameW = Int32.Parse(m_s_number[i].ToString()); //this.Sprite.Position = m_a_position[i]; if (this.m_a_position != null) { this.Sprite.Position = m_a_position[i]; } else { this.Sprite.Position = this.m_position + Vector2.UnitX * (this.Sprite.Frame.Width * i); } this.Sprite.Draw(_spritebatch); } _spritebatch.End(); }
public void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch drawer, Microsoft.Xna.Framework.Graphics.SpriteSortMode sortMode, Microsoft.Xna.Framework.Graphics.SamplerState samplerState) { Stack <Screen> drawStack = new Stack <Screen>(); foreach (Screen screen in screenStack) { drawStack.Push(screen); if (!screen.DrawUnder()) { break; } } while (drawStack.Count != 0) { drawer.Begin(sortMode, null, samplerState); drawStack.Pop().Draw(drawer); drawer.End(); } }
protected override void DrawSelf(Microsoft.Xna.Framework.GameTime gameTime, Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch) { spriteBatch.End(); foreach (var obj in DrawableUIElemts) { foreach (Control elemt in obj.GetDrawableElemt()) { renderer.Render(elemt, spriteBatch); } } spriteBatch.Begin(); if (Status == S_Add) { CozyTiledFactory.GetInstance(CurrentTiledId).DrawAt(gameTime, spriteBatch, CurrentPosition.ToVector2(), NodeContentSize); } foreach (var obj in TempTiles) { var ActualPosition = CozyTiledPositionHelper.ConvertTiledPositionToPosition(obj.Key, NodeContentSize); CozyTiledFactory.GetInstance(obj.Value).DrawAt(gameTime, spriteBatch, ActualPosition, NodeContentSize); } }
public override void draw(Microsoft.Xna.Framework.Graphics.GraphicsDevice _GraphicsDevice, Microsoft.Xna.Framework.Graphics.SpriteBatch _SpriteBatch) { _SpriteBatch.Begin(); base.draw(_GraphicsDevice, _SpriteBatch); _SpriteBatch.End(); }
/// <summary> /// Renders the given <see cref="Komodo.Core.ECS.Components.Drawable2DComponent"/> objects. /// </summary> /// <param name="components"><see cref="Komodo.Core.ECS.Components.Drawable2DComponent"/> objects to render.</param> /// <param name="spriteBatch"><see cref="Microsoft.Xna.Framework.Graphics.SpriteBatch"/> to render with.</param> /// <param name="drawBillboards">Whether or not to billboard the <see cref="Komodo.Core.ECS.Components.Drawable2DComponent"/>.</param> /// <param name="shader">Shader to render with.</param> private void DrawComponents( [NotNull] IEnumerable <Drawable2DComponent> components, [NotNull] SpriteBatch spriteBatch, bool drawBillboards = false, Effect shader = null ) { var oldViewMatrix = Matrix.Identity; var oldWorldMatrix = Matrix.Identity; switch (shader) { case BasicEffect effect: oldViewMatrix = effect.View; oldWorldMatrix = effect.World; break; case SpriteEffect _: case null: default: break; } try { switch (shader) { case BasicEffect effect: effect.Projection = ActiveCamera != null ? ActiveCamera.Projection : Matrix.Identity; if (drawBillboards) { effect.View = Matrix.Identity; } else { effect.View = ActiveCamera != null ? ActiveCamera.ViewMatrix : Matrix.Identity; } if (ActiveCamera != null && ActiveCamera.IsPerspective) { effect.World = Matrix.CreateScale(1f, -1f, 1f); } else { effect.World = Matrix.CreateScale(1f, 1f, 1f); } break; case SpriteEffect _: case null: default: break; } spriteBatch.Begin( SpriteSortMode.FrontToBack, null, TextureFilter, DepthStencilState.DepthRead, RasterizerState.CullNone, shader ); foreach (var component in components) { if (component.IsEnabled && component.Parent != null && component.Parent.IsEnabled && component.IsBillboard == drawBillboards) { DrawComponent(component, spriteBatch); } } } catch (Exception ex) { Console.Error.WriteLine(ex.ToString()); } finally { spriteBatch.End(); switch (shader) { case BasicEffect effect: effect.View = oldViewMatrix; effect.World = oldWorldMatrix; break; case SpriteEffect _: case null: default: break; } } }
public void Draw(Microsoft.Xna.Framework.GameTime gametime, Microsoft.Xna.Framework.Graphics.SpriteBatch spritebatch) { spritebatch.Begin(); spritebatch.End(); }