public override void Draw() { Quads.Begin(); Quads.Render(_topLeft, _bottomRight, null, true, Colors.Black, Colors.Grey * 0.95f); Quads.End(); // Draw each menu entry in turn. Quads.Begin(); foreach (OptionEntry entry in _optionEntries) { Quads.Render(entry.Position - _optionEntrySize / 2f, entry.Position + _optionEntrySize / 2f, null, true, Colors.Black * TransitionAlpha, entry.TileColor * TransitionAlpha); Quads.Render(entry.Position - _optionEntrySize / 2f + _optionCheckOffset, entry.Position + _optionEntrySize / 2f, null, true, Colors.Black * TransitionAlpha, entry.TileColor * TransitionAlpha); } Quads.End(); Sprites.Begin(); foreach (OptionEntry entry in _optionEntries) { Sprites.DrawString(_font, entry.Text, entry.Position + Vector2.One + _optionTextOffset, Colors.Black * TransitionAlpha, 0f, entry.Origin, entry.Scale, SpriteEffects.None, 0f); Sprites.DrawString(_font, entry.Text, entry.Position + _optionTextOffset, entry.TextColor * TransitionAlpha, 0f, entry.Origin, entry.Scale, SpriteEffects.None, 0f); Sprites.Draw(_checkmark, entry.Position - _optionEntrySize / 2f + _optionCheckOffset, Color.White * entry.CheckedFade); } Sprites.End(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); foreach (Body body in _softBodies) { Sprites.Draw(_softBodyBox.Image, ConvertUnits.ToDisplayUnits(body.Position), null, Color.White, body.Rotation, _softBodyBox.Origin, 1f, SpriteEffects.None, 0f); } foreach (Body body in _softBodies) { Sprites.Draw(_softBodyCircle.Image, ConvertUnits.ToDisplayUnits(body.Position), null, Color.White, body.Rotation, _softBodyCircle.Origin, 1f, SpriteEffects.None, 0f); } foreach (Body body in _bridgeBodies) { Sprites.Draw(_bridgeBox.Image, ConvertUnits.ToDisplayUnits(body.Position), null, Color.White, body.Rotation, _bridgeBox.Origin, 1f, SpriteEffects.None, 0f); } Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
public override void Draw() { Lines.Begin(ref Camera.SimProjection, ref Camera.SimView); foreach (Fixture f in _obstacles.FixtureList) { Lines.DrawLine(_distanceBody[0].Position, _distanceBody[1].Position, Colors.Black); Lines.DrawLine(_distanceBody[2].Position, _distanceBody[3].Position, Colors.Black); } Lines.End(); Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 3; i++) { Sprites.Draw(_angleCube.Image, ConvertUnits.ToDisplayUnits(_angleBody[i].Position), null, Color.White, _angleBody[i].Rotation, _angleCube.Origin, 1f, SpriteEffects.None, 0f); } for (int i = 0; i < 4; i++) { Sprites.Draw(_distanceCube.Image, ConvertUnits.ToDisplayUnits(_distanceBody[i].Position), null, Color.White, _distanceBody[i].Rotation, _distanceCube.Origin, 1f, SpriteEffects.None, 0f); } Sprites.End(); Lines.Begin(ref Camera.SimProjection, ref Camera.SimView); foreach (Fixture f in _obstacles.FixtureList) { Lines.DrawLineShape(f.Shape, Colors.Black); } Lines.End(); base.Draw(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); // draw car Sprites.Draw(_wheel.Image, ConvertUnits.ToDisplayUnits(_wheelBack.Position), null, Color.White, _wheelBack.Rotation, _wheel.Origin, 1f, SpriteEffects.None, 0f); Sprites.Draw(_wheel.Image, ConvertUnits.ToDisplayUnits(_wheelFront.Position), null, Color.White, _wheelFront.Rotation, _wheel.Origin, 1f, SpriteEffects.None, 0f); Sprites.Draw(_carBody.Image, ConvertUnits.ToDisplayUnits(_car.Position), null, Color.White, _car.Rotation, _carBody.Origin, 1f, SpriteEffects.None, 0f); // draw teeter Sprites.Draw(_teeter.Image, ConvertUnits.ToDisplayUnits(_board.Position), null, Color.White, _board.Rotation, _teeter.Origin, 1f, SpriteEffects.None, 0f); // draw bridge for (int i = 0; i < _bridgeSegments.Count; ++i) { Sprites.Draw(_bridge.Image, ConvertUnits.ToDisplayUnits(_bridgeSegments[i].Position), null, Color.White, _bridgeSegments[i].Rotation, _bridge.Origin, 1f, SpriteEffects.None, 0f); } // draw boxes for (int i = 0; i < _boxes.Count; ++i) { Sprites.Draw(_box.Image, ConvertUnits.ToDisplayUnits(_boxes[i].Position), null, Color.White, _boxes[i].Rotation, _box.Origin, 1f, SpriteEffects.None, 0f); } Sprites.End(); Lines.Begin(Camera.SimProjection, Camera.SimView); // draw ground for (int i = 0; i < _ground.FixtureList.Count; ++i) { Lines.DrawLineShape(_ground.FixtureList[i].Shape, Color.Black); } Lines.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); _webOfGoo.Draw(Sprites); Sprites.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); Sprites.Draw(_rectangleSprite.Image, ConvertUnits.ToDisplayUnits(_rectangle.Position), null, Color.White, _rectangle.Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); Sprites.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Framework.GraphicsDevice.Clear(Color.White); Sprites.Begin(); Sprites.Draw(_logoTexture, _logoPosition, Color.White); Sprites.End(); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(Sprites); _pyramid.Draw(Sprites); Sprites.End(); base.Draw(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); Sprites.Draw(_objectSprite.Image, ConvertUnits.ToDisplayUnits(_compound.Position), null, Color.White, _compound.Rotation, _objectSprite.Origin, 1f, SpriteEffects.None, 0f); Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); _webOfGoo.Draw(Sprites); Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); Sprites.Draw(_heart.Image, ConvertUnits.ToDisplayUnits(_heartBody.Position), null, Color.White, _heartBody.Rotation, _heart.Origin, 1f, SpriteEffects.None, 0f); Sprites.Draw(_club.Image, ConvertUnits.ToDisplayUnits(_clubBody.Position), null, Color.White, _clubBody.Rotation, _club.Origin, 1f, SpriteEffects.None, 0f); Sprites.Draw(_spade.Image, ConvertUnits.ToDisplayUnits(_spadeBody.Position), null, Color.White, _spadeBody.Rotation, _spade.Origin, 1f, SpriteEffects.None, 0f); Sprites.Draw(_diamond.Image, ConvertUnits.ToDisplayUnits(_diamondBody.Position), null, Color.White, _diamondBody.Rotation, _diamond.Origin, 1f, SpriteEffects.None, 0f); Sprites.End(); base.Draw(); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(Sprites); _circles.Draw(Sprites); _rectangles.Draw(Sprites); _stars.Draw(Sprites); _gears.Draw(Sprites); Sprites.End(); base.Draw(); }
/// <summary> /// Draws the message box. /// </summary> public override void Draw(GameTime gameTime) { Quads.Begin(); Quads.Render(_topLeft, _bottomRight, null, true, ContentWrapper.Black, ContentWrapper.Grey * 0.65f); Quads.End(); Sprites.Begin(); // Draw the message box text. Sprites.DrawString(_font, _message, _textPosition + Vector2.One, ContentWrapper.Black); Sprites.DrawString(_font, _message, _textPosition, ContentWrapper.Beige); Sprites.End(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 48; i++) { Sprites.Draw(_grain.Image, ConvertUnits.ToDisplayUnits(_circles[i].Position), null, Color.White, _circles[i].Rotation, _grain.Origin, 1f, SpriteEffects.None, 1f); } Sprites.End(); _walker.Draw(Sprites, Lines, Camera); base.Draw(gameTime); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 6; ++i) { Sprites.Draw(_circleSprite.Image, ConvertUnits.ToDisplayUnits(_circle[i].Position), null, Color.White, _circle[i].Rotation, _circleSprite.Origin, 1f, SpriteEffects.None, 0f); } Sprites.End(); base.Draw(); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); // draw first rectangle Sprites.Draw(_rectangleSprite.Image, ConvertUnits.ToDisplayUnits(_rectangles.Position), null, Color.White, _rectangles.Rotation, _rectangleSprite.Origin + _offset, 1f, SpriteEffects.None, 0f); // draw second rectangle Sprites.Draw(_rectangleSprite.Image, ConvertUnits.ToDisplayUnits(_rectangles.Position), null, Color.White, _rectangles.Rotation, _rectangleSprite.Origin - _offset, 1f, SpriteEffects.None, 0f); Sprites.End(); base.Draw(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(Sprites); _circles.Draw(Sprites); _rectangles.Draw(Sprites); _stars.Draw(Sprites); _gears.Draw(Sprites); Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(Sprites); for (int i = 0; i < _spiders.Length; i++) { _spiders[i].Draw(Sprites); } Sprites.End(); base.Draw(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 9; i++) { Sprites.Draw(_obstacle.Image, ConvertUnits.ToDisplayUnits(_obstacles[i].Position), null, Color.White, _obstacles[i].Rotation, _obstacle.Origin, 1f, SpriteEffects.None, 0f); } _ragdoll.Draw(Sprites); Sprites.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(Sprites); for (int i = 0; i < _spiders.Length; i++) { _spiders[i].Draw(Sprites); } Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 5; ++i) { Sprites.Draw(_obstacle.Image, ConvertUnits.ToDisplayUnits(_obstacles[i].Position), null, Color.White, _obstacles[i].Rotation, _obstacle.Origin, 1f, SpriteEffects.None, 0f); } _agent.Draw(Sprites); Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }
/// <summary> /// Draws the menu. /// </summary> public override void Draw(GameTime gameTime) { Vector2 transitionOffset = new Vector2(0f, (float)Math.Pow(TransitionPosition, 2) * 90f); // Draw each menu entry in turn. Quads.Begin(); foreach (MenuEntry entry in _menuEntries) { Quads.Render(entry.Position - _menuEntrySize / 2f, entry.Position + _menuEntrySize / 2f, null, true, ContentWrapper.Grey * entry.Alpha * TransitionAlpha, entry.TileColor * entry.Alpha * TransitionAlpha); } Quads.Render(_menuSlider.Position - new Vector2(_menuEntrySize.Y / 2f), _menuSlider.Position + new Vector2(_menuEntrySize.Y / 2f), null, true, ContentWrapper.Grey * TransitionAlpha, _menuSlider.TileColor * TransitionAlpha); Quads.End(); Sprites.Begin(); foreach (MenuEntry entry in _menuEntries) { Sprites.DrawString(_font, entry.Text, entry.Position + Vector2.One, ContentWrapper.Black * entry.Alpha * entry.Alpha * TransitionAlpha, 0f, entry.Origin, entry.Scale, SpriteEffects.None, 0f); Sprites.DrawString(_font, entry.Text, entry.Position, entry.TextColor * entry.Alpha * TransitionAlpha, 0f, entry.Origin, entry.Scale, SpriteEffects.None, 0f); if (entry.Fade > 0f) { Sprites.Draw(entry.Preview, PreviewPosition, null, Color.White * Math.Max((TransitionAlpha - 0.8f) / 0.2f, 0f) * entry.Fade, 0f, _previewOrigin, 1f, SpriteEffects.None, 0f); } } Sprites.End(); Quads.Begin(); Quads.Render(Vector2.Zero, new Vector2(Framework.GraphicsDevice.Viewport.Width, TitleBarHeight), null, ContentWrapper.Grey * 0.7f * TransitionAlpha); Quads.End(); // Make the menu slide into place during transitions, using a // power curve to make things look more interesting (this makes // the movement slow down as it nears the end). Sprites.Begin(); Sprites.Draw(_samplesLogo, _titlePosition - transitionOffset, null, Color.White, 0f, _titleOrigin, 1f, SpriteEffects.None, 0f); Sprites.End(); }
public override void Draw() { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 5; ++i) { Sprites.Draw(_rectangleSprite.Image, ConvertUnits.ToDisplayUnits(_rectangle[i].Position), null, Color.White, _rectangle[i].Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); } Sprites.End(); Lines.Begin(ref Camera.SimProjection, ref Camera.SimView); foreach (Fixture f in _ramps.FixtureList) { Lines.DrawLineShape(f.Shape, Colors.Teal); } Lines.End(); base.Draw(); }
public override void Draw(GameTime gameTime) { Sprites.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 3; i++) { if (_breakableCookie[i].Broken) { for (int j = 0; j < _breakableCookie[i].Parts.Count; j++) { Body b = _breakableCookie[i].Parts[j].Body; Sprites.Draw(_breakableSprite[j].Image, ConvertUnits.ToDisplayUnits(b.Position), null, Color.White, b.Rotation, _breakableSprite[j].Origin, 1f, SpriteEffects.None, 0f); } } else { Sprites.Draw(_completeSprite.Image, ConvertUnits.ToDisplayUnits(_breakableCookie[i].MainBody.Position), null, Color.White, _breakableCookie[i].MainBody.Rotation, _completeSprite.Origin, 1f, SpriteEffects.None, 0f); } } Sprites.End(); _border.Draw(Camera.SimProjection, Camera.SimView); base.Draw(gameTime); }