Пример #1
0
 public Player(Game game, AnimatedSprite sprite)
 {
     gameRef = (Game1)game;
     camera = new Camera(gameRef.ScreenRectangle);
     this.sprite = sprite;
     camera.LockToSprite(sprite);
 }
Пример #2
0
 public Player(Game game, AnimatedSprite sprite)
 {
     gameRef = (Game1)game;
     camera = new Camera(gameRef.ScreenRectangle);
     this.sprite = sprite;
     camera.LockToSprite(sprite);
     playerrect = new Rectangle(
             (int)sprite.Position.X,
             (int)sprite.Position.Y,
             sprite.Width,
             sprite.Height);
 }