public object?Load(AssetInitializerArgs args, IAssetLoader assetLoader) { Debug.Assert(args is SfmlAudioInitializerArgs, INVALID_INITIALIZER_ARGS.Format(nameof(SfmlAudioInitializer), nameof(SfmlAudioInitializerArgs))); var sfmlArgs = (SfmlAudioInitializerArgs)args; switch (sfmlArgs.BufferMode) { case BufferMode.Buffered: return(new Music(assetLoader.GetString(args.Key))); default: case BufferMode.None: return(new Sound(new SoundBuffer(assetLoader.GetString(args.Key)))); } }
public object Load(AssetInitializerArgs args, IAssetLoader assetLoader) { return(new Image(assetLoader.GetString(args.Key))); }