Exemplo n.º 1
0
        public void WizardRubyCollision(EasyGameComponent wizard, EasyGameComponent ruby)
        {
            EffectGameComponent effect = AddEffect("zap", ruby.DisplayPosition);

            display1.Score++;
            ruby.Remove();
            AddRuby();
        }
Exemplo n.º 2
0
        public void BallBrickCollision(EasyGameComponent ball, EasyGameComponent brick)
        {
            brick.Remove();
            EffectGameComponent effect = AddEffect("colorexplosion", brick.DisplayPosition);

            effect.SecondsPerFrame = .05;
            effect.OverlayColor    = brick.OverlayColor;
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 7
0
 public void FireballBrickCollision(EasyGameComponent fireball, EasyGameComponent brick)
 {
     fireball.Remove();
 }
Exemplo n.º 8
0
 public void AddRuby()
 {
     ruby = this.AddComponent("ruby");
     ruby.SetRandomPosition(viewableArea);
 }
Exemplo n.º 9
0
 public void FireballMonsterCollision(EasyGameComponent fireball, EasyGameComponent monster)
 {
     AddEffect("colorexplosion", monster.DisplayPosition);
     monster.Remove();
     fireball.Remove();
 }