public override void DoEffect(BubbleGrid bubbleGrid) { foreach (Bubble bubble in bubbleGrid.Bubbles) { if (bubble.Position.X == position.X || bubble.Position.Y == position.Y) { bubble.Activate(); } } }
public override void DoEffect(BubbleGrid bubbleGrid) { if (bubbleGrid.NumberOfActivatedBubbles() < bubblesRequiredToActivate) { return; } foreach (Bubble bubble in bubbleGrid.Bubbles) { if (bubbleColor == bubble.BubbleColor) { bubble.Activate(); } } Console.WriteLine("This powerup has been activated!"); }
public override void LoadContent(ContentManager content) { score = new Score(); level = 1; font = content.Load <SpriteFont>("Score"); background = content.Load <Texture2D>("background"); bubbleGrid = new BubbleGrid(content); bubbleGrid.Initialize(difficulty); oldState = Mouse.GetState(); /*These lines are when we want to test larger grids. First switch the values of SCREEN_WIDTH and _HEIGHT in Constants.cs to those * commented out. */ //graphics.PreferredBackBufferWidth = (int)(Constants.SCREEN_WIDTH / 1.4f); //graphics.PreferredBackBufferHeight = (int)(Constants.WORLD_HEIGHT/ 1.4f); backgroundColor = new Color(0, 0, 28); }
public abstract void DoEffect(BubbleGrid bubbleGrid);