Ejemplo n.º 1
0
 public void LoadAll()
 {
     using (List <Sprite> .Enumerator enumerator = this.spritesToLoad.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             Sprite current = enumerator.Current;
             Rect   rect    = current.get_rect();
             SpritesDataPool.GetSpriteColors(current, (int)((Rect) ref rect).get_position().x, (int)((Rect) ref rect).get_position().y, (int)((Rect) ref rect).get_size().x, (int)((Rect) ref rect).get_size().y);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Load all referenced Sprites to the SpritesDataPool.
 /// </summary>
 public void LoadAll()
 {
     //Go over all referenced sprites
     foreach (Sprite sprite in spritesToLoad)
     {
         Rect spriteRect = sprite.rect;
         //Add current sprite to the SpritesDataPool
         SpritesDataPool.GetSpriteColors(sprite,
                                         (int)spriteRect.position.x,
                                         (int)spriteRect.position.y,
                                         (int)spriteRect.size.x,
                                         (int)spriteRect.size.y);
     }
 }