SetBounds() public method

public SetBounds ( float x, float y, float width, float height ) : void
x float
y float
width float
height float
return void
Esempio n. 1
0
 private Sprite NewSprite(AtlasRegion region)
 {
     if (region.PackedWidth == region.OriginalWidth && region.PackedHeight == region.OriginalHeight)
     {
         if (region.Rotate)
         {
             Sprite sprite = new Sprite(region);
             sprite.SetBounds(0, 0, region.RegionHeight, region.RegionWidth);
             sprite.Rotate90(true);
             return(sprite);
         }
         return(new Sprite(region));
     }
     return(new AtlasSprite(region));
 }
Esempio n. 2
0
 private Sprite NewSprite(AtlasRegion region)
 {
     if (region.PackedWidth == region.OriginalWidth && region.PackedHeight == region.OriginalHeight) {
         if (region.Rotate) {
             Sprite sprite = new Sprite(region);
             sprite.SetBounds(0, 0, region.RegionHeight, region.RegionWidth);
             sprite.Rotate90(true);
             return sprite;
         }
         return new Sprite(region);
     }
     return new AtlasSprite(region);
 }