Esempio n. 1
0
 public FrameModel(World world)
     : base(world)
 {
     Rectangle viewport = world.GetViewport();
     _topWall = new Rectangle(viewport.Left + WallWidth, viewport.Top, viewport.Width - (WallWidth * 2), WallWidth);
     _leftWall = new Rectangle(viewport.Left, viewport.Top, WallWidth, viewport.Height);
     _rightWall = new Rectangle(viewport.Right - WallWidth, viewport.Top, WallWidth, viewport.Height);
 }
Esempio n. 2
0
 public PlayerModel(World world, float scale)
     : base(world)
 {
     _world = world;
     _width = 120;
     _height = 20;
     var viewport = world.GetViewport();
     _ship = new Rectangle(viewport.Center.X,
             (viewport.Bottom - viewport.Height / 8),
             (int)(_width * scale), (int)(_height * scale));
 }