| OLD | NEW |
| 1 part of sprites; | 1 part of sprites; |
| 2 | 2 |
| 3 /// A sprite sheet packs a number of smaller images into a single large image. | 3 /// A sprite sheet packs a number of smaller images into a single large image. |
| 4 /// | 4 /// |
| 5 /// The placement of the smaller images are defined by a json file. The larger i
mage and json file is typically created | 5 /// The placement of the smaller images are defined by a json file. The larger i
mage and json file is typically created |
| 6 /// by a tool such as TexturePacker. The [SpriteSheet] class will take a referen
ce to a larger image and a json string. | 6 /// by a tool such as TexturePacker. The [SpriteSheet] class will take a referen
ce to a larger image and a json string. |
| 7 /// From the image and the string the [SpriteSheet] creates a number of [Texture
] objects. The names of the frames in | 7 /// From the image and the string the [SpriteSheet] creates a number of [Texture
] objects. The names of the frames in |
| 8 /// the sprite sheet definition are used to reference the different textures. | 8 /// the sprite sheet definition are used to reference the different textures. |
| 9 class SpriteSheet { | 9 class SpriteSheet { |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 /// The image used by the sprite sheet. | 65 /// The image used by the sprite sheet. |
| 66 /// | 66 /// |
| 67 /// var spriteSheetImage = mySpriteSheet.image; | 67 /// var spriteSheetImage = mySpriteSheet.image; |
| 68 Image get image => _image; | 68 Image get image => _image; |
| 69 | 69 |
| 70 /// Returns a texture by its name. | 70 /// Returns a texture by its name. |
| 71 /// | 71 /// |
| 72 /// var myTexture = mySpriteSheet["example.png"]; | 72 /// var myTexture = mySpriteSheet["example.png"]; |
| 73 Texture operator [](String fileName) => _textures[fileName]; | 73 Texture operator [](String fileName) => _textures[fileName]; |
| 74 } | 74 } |
| OLD | NEW |