/// <summary> /// Create a new game screen. Should be done every time there is a new game. /// </summary> /// <param name="theScreenEvent"></param> /// <param name="contentManager"></param> public GameScreen(EventHandler theScreenEvent,ContentManager contentManager) : base(theScreenEvent) { bScoreWasAdded = false; this.contentManager = contentManager; dlDoubleJumpTimer = new DanLabel(1150, 20, 100, 50); //Init our intrepid hero csHero = new ControlledSprite(); bg = new LayeredBackground(); djeJumpEffect = new DoubleJumpEffect(); altimeter = new Altimeter(); // Make a camera for the screen with an altimeter cCamera = new Camera(50, 100, 600, 520, altimeter); blocks = new List<Sprite>(); Sprite sp = new Sprite(); blocks.Add(sp); sp = new Sprite(); blocks.Add(sp); sp = new Sprite(); blocks.Add(sp); sp = new Sprite(); blocks.Add(sp); sp = new Sprite(); blocks.Add(sp); // REVIST Set up the Arcing Block Manager with the difficulty arcingBlockManager = new ArcingBlockManager(cCamera, blocks, contentManager, 500, 300, 150, "Sprites/block2"); }
/// <summary> /// Make a new progression given the background, the altimeter, and what pictures /// to swap in at what heights. /// </summary> public BackgroundProgression(LayeredBackground theBg, Altimeter theAltimeter, string[] theBGAssets, string[] theLayer1Assets, string[] theLayer2Assets, int[] theHeights) { bg = theBg; altimeter = theAltimeter; bgAssets = theBGAssets; layer1Assets = theLayer1Assets; layer2Assets = theLayer2Assets; heights = theHeights; bCheckPoints = new bool[heights.Length]; for (int i = 0; i < heights.Length; i++) bCheckPoints[i] = false; }
public Camera(int x, int y, int width, int height, Altimeter alt) { rectCamera = new Rectangle(x, y, width, height); altimeter = alt; fallenAmount = 0; }