public Player(Texture2D texture, int depth, Point pos) { this.Sprite = new AnimatedSprite(texture, pos, 1, 8); this.Depth = depth; this.Position = pos; }
public Player() { this.Sprite = new StaticSprite(); this.Depth = 0; this.Position = Point.Zero; }
public Rectangle getAreaOnScreen(Point original, ISpriteInterface sprite, CameraManager camera) { Vector2 screenPos = getScreenPos(original, camera); return(new Rectangle((int)Math.Ceiling(screenPos.X - sprite.Texture.Width / sprite.Columns / camera.ZoomFactor), (int)Math.Ceiling(screenPos.Y - sprite.Texture.Height / sprite.Rows / camera.ZoomFactor), (int)Math.Ceiling(sprite.Texture.Width / sprite.Columns / camera.ZoomFactor), (int)Math.Ceiling(sprite.Texture.Height / sprite.Rows / camera.ZoomFactor))); }