public void changeBubbles() { bubbles[1].moveTo(locations[0], interval); bubbles[2].moveTo(locations[1], interval); bubbles[0] = bubbles[1]; bubbles[1] = bubbles[2]; bubbles[2] = BubbleCreator.createRandomBubble(locations[2]); childComponents.Add(bubbles[2]); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); Services.AddService(typeof(SpriteBatch), spriteBatch); BubbleCreator.setXNA(this); font = Content.Load <SpriteFont>("font"); background = Content.Load <Texture2D>("sky"); screenWidth = GraphicsDevice.PresentationParameters.BackBufferWidth; screenHeight = GraphicsDevice.PresentationParameters.BackBufferHeight; initGame(); }
public override void Initialize() { locations[0] = new Point(boardPosition.x, boardPosition.y, boardPosition.z); locations[1] = new Point(boardPosition.x - 4, boardPosition.y, boardPosition.z); locations[2] = new Point(boardPosition.x - 8, boardPosition.y, boardPosition.z); bubbles[0] = BubbleCreator.createRandomBubble(locations[0]); childComponents.Add(bubbles[0]); bubbles[1] = BubbleCreator.createRandomBubble(locations[1]); childComponents.Add(bubbles[1]); bubbles[2] = BubbleCreator.createRandomBubble(locations[2]); childComponents.Add(bubbles[2]); arrow = new Arrow(Game, new Point(locations[0].x, locations[0].y, boardPosition.z), new Angle(0), new Angle(zSloap)); childComponents.Add(arrow); base.Initialize(); }