Exemplo n.º 1
0
        public void setup()
        {
            Player subby;
            subby = new Player() {
                Fuel = 1000,
                Speed = 0,
                AngleDegrees = 0,
                Position = new Vector2(0, 0),
                 Bullits = 10,
                 Health = 1000
            };

            level = new Level();
            level.Subby = subby;
            levelboundaries = new LevelBoundaries() { Bottom = 200, Left = 10, Right = 200, Top = 10 };
            level.LevelBoundaries = levelboundaries;
            level.ScrollingPosition = 0;
            wrak = new Wrak();
            wrak.Damage = 1;
            wrak.Position = new Vector2(0, 0);
        }
Exemplo n.º 2
0
 private void UpdateScrollingPosition(Player subby, LevelBoundaries levelBoundaries)
 {
     ScrollingPosition += (int)subby.Position.X - (int)LevelBoundaries.Right;
 }