public void WizardRubyCollision(EasyGameComponent wizard, EasyGameComponent ruby) { EffectGameComponent effect = AddEffect("zap", ruby.DisplayPosition); display1.Score++; ruby.Remove(); AddRuby(); }
public void BallBrickCollision(EasyGameComponent ball, EasyGameComponent brick) { brick.Remove(); EffectGameComponent effect = AddEffect("colorexplosion", brick.DisplayPosition); effect.SecondsPerFrame = .05; effect.OverlayColor = brick.OverlayColor; }
public void AddMonsters(string imageName, int count) { for (int i = 0; i < count; i++) { EasyGameComponent monster = this.AddRotatingWanderingComponent(imageName); monster.Category = "monster"; monster.SetRandomPosition(viewableArea); } }
public EasyGameComponent AddBrick(int row, int col) { int start = 60; EasyGameComponent brick = AddComponent("brick-1x2"); brick.Category = "brick"; brick.SetPosition(start + (col * brick.Width), start + (row * brick.Height)); brick.OverlayColor = RandomHelper.Color(); return(brick); }
public void WizardMonsterCollision(EasyGameComponent wizard, EasyGameComponent monster) { wizard.Remove(); AddEffect("colorexplosion", wizard.DisplayPosition); String message = RandomHelper.PickOne("OUCH", "DEAD", "RIP", "BYE"); TextEffect textEffect = AddTextEffect("segoe", message, wizard.DisplayPosition, Color.Red); textEffect.SecondsToLive = 1; textEffect.MakeFlashingText(Color.WhiteSmoke, .05); AddTimedEvent(3, AddWizard1, 1); }
public EasyGameComponent AddBall() { ball = AddComponent("ball"); ball.EdgeFriction = 0; ball.Rotateable = true; ball.BounceFactor = 1; ball.Static = false; ball.SetPosition(200, 700); ball.IsBullet = true; ball.Nudge(.6f, -.6f); ball.MaxVelocity = 2f; ball.ConstantVelocity = 10; return(ball); }
public void FireballBrickCollision(EasyGameComponent fireball, EasyGameComponent brick) { fireball.Remove(); }
public void AddRuby() { ruby = this.AddComponent("ruby"); ruby.SetRandomPosition(viewableArea); }
public void FireballMonsterCollision(EasyGameComponent fireball, EasyGameComponent monster) { AddEffect("colorexplosion", monster.DisplayPosition); monster.Remove(); fireball.Remove(); }