FerretEngine/src/Graphics/SpriteSheet.cs
/// <summary>
/// Returns the sprite in the [i, j] position in the
/// SpriteSheet rows and columns.
/// </summary>
/// <param name="i">Row index</param>
/// <param name="j">Column index</param>
/// <returns></returns>
Returns the sprite in the [i, j] position in the
SpriteSheet rows and columns.
Returns the sprite in the [ i j ] position in the SpriteSheet rows and columns .
public Sprite GetSprite(int i, int j)
        {
            int x = BeginX + (SpriteWidth + OffsetX) * i;
            int y = BeginY + (SpriteHeight + OffsetY) * j;
            return new Sprite(Texture, new Rectangle(x, y, SpriteWidth, SpriteHeight));
        }
public Sprite GetSprite ( int i , int j ) { int x = BeginX + ( SpriteWidth + OffsetX ) * i ; int y = BeginY + ( SpriteHeight + OffsetY ) * j ; return new Sprite ( Texture , new Rectangle ( x , y , SpriteWidth , SpriteHeight ) ) ; }
Returns the sprite in the [i, j] position in the
SpriteSheet rows and columns.
Returns the sprite in the [ i j ] position in the SpriteSheet rows and columns .
None
i
int
None
j
int
None