public override void Draw(GameTime gameTime, MyGraphicsClass graphics) { base.Draw(gameTime, graphics); Vector2 pos = this.WorldPosition(); float dr = this.WorldDirection(); collidable.Draw(graphics, pos, dr); }
public static void Initialize(MyGraphicsClass graphics, InputManager inputManager, Camera camera) { Vector2 screenSize = new Vector2(graphics.getGraphics().PreferredBackBufferWidth, graphics.getGraphics().PreferredBackBufferHeight); GunnerController.inputManager = inputManager; GunnerController.camera = camera; screen = new Utils.RectangleF(new Vector2(0), screenSize); }
public void Draw(GameTime gameTime, MyGraphicsClass graphics) { graphics.BeginWorld(); foreach (GameObject obj in listManager.GetList <GameObject>()) { obj.Draw(gameTime, graphics); } graphics.EndWorld(); }
public void Draw(MyGraphicsClass graphics, Vector2 pos) { if (this.Contains(pos)) { Draw(graphics, Color.Red, 1); } else { Draw(graphics, Color.Blue, 1); } }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { base.Initialize(); this.camera = new Camera(new Vector2(0), 1f, 0, this.graphics); SpriteBatch spriteBatch = new SpriteBatch(GraphicsDevice); myGraphicsObject = new DrawingUtils.MyGraphicsClass(this.graphics, spriteBatch, this.camera); backGround = new BackGround(worldSize); gameObjectCollection = new GameObjectCollection(worldSize); this.graphics.PreferredBackBufferWidth = this.graphics.GraphicsDevice.DisplayMode.Width; this.graphics.PreferredBackBufferHeight = this.graphics.GraphicsDevice.DisplayMode.Height; this.graphics.ApplyChanges(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of the content. /// </summary> protected override void LoadContent() { Content.RootDirectory = "Content"; MyGraphicsClass.LoadContent(Content); TextureLoader.LoadContent(Content); }
public override void Draw(GameTime gameTime, MyGraphicsClass graphics) { collidable.Draw(graphics); }
public override void Draw(GameTime gameTime, MyGraphicsClass graphics) { base.Draw(gameTime, graphics); }
public void Draw(GameTime gameTime, MyGraphicsClass graphics) { //throw new NotImplementedException(); graphics.getSpriteBatch().Draw(Textures.AimPoint, aimPoint, null, color, 0, new Vector2((float)(Textures.AimPoint.Width / 2.0)), 1, Microsoft.Xna.Framework.Graphics.SpriteEffects.None, 1); }
public void Draw(MyGraphicsClass graphics, Color color, float depth) { graphics.DrawLine(point1, point2, color, depth); graphics.DrawLine(point1, point3, color, depth); graphics.DrawLine(point3, point2, color, depth); }