addSprite method
Implementation
Future<void> addSprite(String fileName) async {
if ((_sprites.containsKey(fileName) && _sprites[fileName] != null) ||
_gameManager == null) return;
final image = await _gameManager!.images.load(fileName);
if (_sprites.containsKey(fileName) && _sprites[fileName] != null)
return; // If aleady registered in the mean time
_sprites[fileName] = Sprite(image);
}