Пример #1
0
 public DeathCloudParticle(ContentManager Content,
                           GameUnit centerX, GameUnit centerY,
                           VelocityUnit speed, DegreesUnit angle)
 {
     this.centerX = centerX - Units.HalfTile;
     this.centerY = centerY - Units.HalfTile;
     this.speed   = speed;
     offset       = new PolarVector(0, angle);
     sprite       = new AnimatedSprite(Content, SpriteName,
                                       Units.TileToPixel(SourceX), Units.TileToPixel(SourceY),
                                       Units.TileToPixel(SourceWidth), Units.TileToPixel(SourceHeight),
                                       Fps, NumFrames);
 }
Пример #2
0
 public DeathCloudParticle(ContentManager Content,
     GameUnit centerX, GameUnit centerY,
     VelocityUnit speed, DegreesUnit angle)
 {
     this.centerX = centerX - Units.HalfTile;
     this.centerY = centerY - Units.HalfTile;
     this.speed = speed;
     offset = new PolarVector(0, angle);
     sprite = new AnimatedSprite(Content, SpriteName,
         Units.TileToPixel(SourceX), Units.TileToPixel(SourceY),
         Units.TileToPixel(SourceWidth), Units.TileToPixel(SourceHeight),
         Fps, NumFrames);
 }
Пример #3
0
 public HeadBumpParticle(ContentManager Content,
     GameUnit centerX, GameUnit centerY)
 {
     this.centerX = centerX;
     this.centerY = centerY;
     sprite = new Sprite(Content, "Caret",
         Units.GameToPixel(SourceX), Units.GameToPixel(SourceY),
         Units.GameToPixel(Width), Units.GameToPixel(Height));
     timer = new Timer(LifeTime, true);
     particleA = new PolarVector(0, Game1.Random.Next(0, 360));
     maxOffsetA = 4 + Game1.Random.Next(0, 16);
     particleB = new PolarVector(0, Game1.Random.Next(0, 360));
     maxOffsetB = 4 + Game1.Random.Next(0, 16);
 }
Пример #4
0
 public HeadBumpParticle(ContentManager Content,
                         GameUnit centerX, GameUnit centerY)
 {
     this.centerX = centerX;
     this.centerY = centerY;
     sprite       = new Sprite(Content, "Caret",
                               Units.GameToPixel(SourceX), Units.GameToPixel(SourceY),
                               Units.GameToPixel(Width), Units.GameToPixel(Height));
     timer      = new Timer(LifeTime, true);
     particleA  = new PolarVector(0, Game1.Random.Next(0, 360));
     maxOffsetA = 4 + Game1.Random.Next(0, 16);
     particleB  = new PolarVector(0, Game1.Random.Next(0, 360));
     maxOffsetB = 4 + Game1.Random.Next(0, 16);
 }