/// <summary> /// Load your graphics content. /// </summary> protected override void LoadContent() { cat.Texture = Content.Load<Texture2D>("CatTexture"); dog.Texture = Content.Load<Texture2D>("DogTexture"); checkerTexture = Content.Load<Texture2D>("checker"); quadDrawer = new QuadDrawer(graphics.GraphicsDevice); }
/// <summary> /// Load your graphics content. /// </summary> protected override void LoadContent() { cat.Texture = Content.Load <Texture2D>("CatTexture"); dog.Texture = Content.Load <Texture2D>("DogTexture"); checkerTexture = Content.Load <Texture2D>("checker"); quadDrawer = new QuadDrawer(graphics.GraphicsDevice); }
/// <summary> /// Draws the entity as a billboard sprite. /// </summary> public void Draw(QuadDrawer quadDrawer, Vector3 cameraPosition, Matrix view, Matrix projection) { Matrix world = Matrix.CreateTranslation(0, 1, 0) * Matrix.CreateScale(800) * Matrix.CreateConstrainedBillboard(Position, cameraPosition, Up, null, null); quadDrawer.DrawQuad(Texture, 1, world, view, projection); }