示例#1
0
 //The GameManager includes a JewelHandler, a timer for the game, a parallax background and a camera. All data assigned.
 public GameManager(Viewport viewport, Vector2 WorldSize, int jewels, int _desiredJewels, int timeSeconds)
 {
     jewelHandler  = new JewelHandler(WorldSize, 32, (byte)jewels, _desiredJewels, new Vector2(0, 0));
     remainingTime = timeSeconds * 1000;
     gameTimer     = new Timer(remainingTime, true);
     camera        = new Camera(viewport,
                                new Rectangle(
                                    (int)jewelHandler.X,
                                    (int)jewelHandler.Y,
                                    (int)jewelHandler.WorldSize.X * jewelHandler.jewelSize,
                                    (int)jewelHandler.WorldSize.Y * jewelHandler.jewelSize));
     parallax = new ParallaxObject("LoopFlower", Vector2.Zero);
 }
示例#2
0
 //The GameManager includes a JewelHandler, a timer for the game, a parallax background and a camera. All data assigned.
 public GameManager(Viewport viewport, Vector2 WorldSize, int jewels, int _desiredJewels, int timeSeconds)
 {
     jewelHandler = new JewelHandler(WorldSize, 32, (byte)jewels, _desiredJewels, new Vector2(0, 0));
     remainingTime = timeSeconds * 1000;
     gameTimer = new Timer(remainingTime, true);
     camera = new Camera(viewport,
         new Rectangle(
             (int)jewelHandler.X,
             (int)jewelHandler.Y,
             (int)jewelHandler.WorldSize.X * jewelHandler.jewelSize,
             (int)jewelHandler.WorldSize.Y * jewelHandler.jewelSize));
     parallax = new ParallaxObject("LoopFlower", Vector2.Zero);
 }