public Bow(Vector2 position, ContentManager content) { this.position = position; this.LoadContent(content); this.sprite = new AnimatedBow(this.texture, 140, 39); this.arrow = new Arrow(content); }
public void Draw(SpriteBatch spriteBatch) { AnimatedBow sprite = this.sprite; SpriteBatch spriteBatch1 = spriteBatch; Vector2 position = this.position; MouseState state = Mouse.GetState(); double x = (double)state.X; state = Mouse.GetState(); double y = (double)state.Y; Vector2 target = new Vector2((float)x, (float)y); sprite.Draw(spriteBatch1, position, target); if (!this.arrow.IsActive) { return; } this.arrow.Draw(spriteBatch); }