Пример #1
0
 public ExplodedObject(ISpriteBased obj)
     : base(obj.Game)
 {
     int colCount = Game.Random.Next((int) obj.Width/PeaceWidth, (int) obj.Width/PeaceWidth + 4);
     int rowCount = Game.Random.Next((int) obj.Height/PeaceWidth, (int) obj.Height/PeaceWidth + 4);
     Init(obj.Sprite, obj.CenterPosition, PeaceWidth, colCount, rowCount);
 }
Пример #2
0
 public ExplodedObject(ISpriteBased obj, int peaceWidth, int colCount, int rowCount, int rand)
     : base(obj.Game)
 {
     Init(obj.Sprite, obj.CenterPosition, peaceWidth, colCount + Game.Random.Next(-rand, rand),
          rowCount + Game.Random.Next(-rand, rand));
 }