Beispiel #1
0
 public void AddSpritesTo(GFXContainer gfxc)
 {
     foreach (var sprite in Sprites)
     {
         gfxc.AddObject(sprite);
     }
 }
Beispiel #2
0
 public void BuildLevel(GFXContainer maingfx)
 {
     (this.Background as SpriteObject).loadFromImagePathPreserveObjectSize();
     (this.LevelBkg as SpriteObject).loadFromImagePathPreserveObjectSize();
     maingfx.AddObject(this.Background);
     maingfx.AddObject(this.LevelBkg);
     maingfx.Width = this.LevelBkg.SizeV.X;
     // Load Pictures
     foreach (var sprite in this.Sprites)
     {
         if (sprite is SpriteObject)
         {
             (sprite as SpriteObject).loadFromImagePathPreserveObjectSize();
         }
     }
     this.AddSpritesTo(maingfx);
     this.InitializeCollider(maingfx);
 }