Esempio n. 1
0
        public override void explode(List<Platform> plats,WizardWars game)
        {
            Platform p=Ground.get();
            for (int i = 0; i < plats.Count; i++)
            {
                if (pos.X>plats[i].pos.X && pos.X+dim.X<plats[i].pos.X+plats[i].dim.X
                        && plats[i].pos.Y < p.pos.Y)
                    p = plats[i];
            }

            Vector2 impactPt = new Vector2(getCenter().X, p.pos.Y -
                p.maxHeight((int)pos.X, (int)(pos.X + dim.X)));
            game.lightningDim = new Vector2(100, impactPt.Y);
            game.lightningPos = new Vector2(impactPt.X - game.lightningDim.X * .1818f,
                                            impactPt.Y - game.lightningDim.Y * .992f);
            game.drawLightning = true;
            p.dmg((int)pos.X - 10, (int)(pos.X + dim.X + 10), (int)power);
            for (int i = 0; i < game.players.Length; i++)
                if (!(game.players[i] is AirWizard))
                    game.players[i].Stun((power / Math.Max(StationarySprite.distance
                        (impactPt,game.players[i].getCenter()),20)*800));
            base.explode(plats,game);
        }
Esempio n. 2
0
 public virtual void explode(List<Platform> plats,WizardWars game)
 {
     die();
 }
Esempio n. 3
0
 public virtual void explode(WizardWars game)
 {
     die();
 }
Esempio n. 4
0
 public virtual void explode(WizardWars game,Platform p)
 {
     die();
 }
Esempio n. 5
0
 public static void setGame(WizardWars g)
 {
     game = g;
 }
Esempio n. 6
0
 public override void explode(WizardWars game)
 {
     game.portals[game.earlierPortal()] =
         new PortalArea(DateTime.Now, getCenter(), new Vector2(power/5,power/5));
     base.explode(game);
 }