Skip to content

Commit

Permalink
Fixed SpriteSheet loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ThuCommix committed Sep 29, 2013
1 parent ff755fc commit 62682a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sharpex.GameLibrary/Framework/Content/ContentManager.cs
Expand Up @@ -93,7 +93,11 @@ public T Load<T>(string asset)
}
if (typeof (T) == typeof (SpriteSheet))
{
return (T)(Object)SpriteSheet.Factory.Create(FileSystem.ConnectPath(ContentPath, asset));
using (var fileStream = FileSystem.Open(FileSystem.ConnectPath(ContentPath, asset)))
{
var texture = SGL.Implementations.Get<TextureSerializer>().Read(new BinaryReader(fileStream));
return (T)(Object)new SpriteSheet(texture.Texture2D);
}
}
if (typeof(T) == typeof(Sound))
{
Expand Down

0 comments on commit 62682a4

Please sign in to comment.