Exemplo n.º 1
0
 public Player(Texture2D texture, int depth, Point pos)
 {
     this.Sprite   = new AnimatedSprite(texture, pos, 1, 8);
     this.Depth    = depth;
     this.Position = pos;
 }
Exemplo n.º 2
0
 public Player()
 {
     this.Sprite   = new StaticSprite();
     this.Depth    = 0;
     this.Position = Point.Zero;
 }
Exemplo n.º 3
0
        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)));
        }