Skip to content

Commit

Permalink
release 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Doraku committed Mar 17, 2019
1 parent ac7bfcf commit f618e10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,20 @@ public sealed class TextureResourceManager : AResourceManager<string, Texture2D>
private readonly GraphicsDevice _device;
private readonly ITextureLoader _loader;

// ITextureLoader is the actual loader, not shown here
// ITextureLoader is the actual loader, not shown here
public TextureResourceManager(GraphicsDevice device, ITextureLoader loader)
{
_device = device;
_loader = loader;
}

// this will only be called if the texture with the key info has never been loaded yet or it has previously been disposed because it was not used anymore
// this will only be called if the texture with the key info has never been loaded yet or it has previously been disposed because it was not used anymore
protected override Texture2D Load(string info) => _loader.Load(_device, info);

// this is the callback method where the entity with the ManagedResource<string, Texture2D> component is set, the TInfo and the resource are given do act as needed
// this is the callback method where the entity with the ManagedResource<string, Texture2D> component is set, the TInfo and the resource are given do act as needed
protected override void OnResourceLoaded(in Entity entity, string info, Texture2D resource)
{
// here we just set the texture to a field of an other component of the entity which contains all the information needed to draw it (position, size, origin, rotation, texture, ...)
// here we just set the texture to a field of an other component of the entity which contains all the information needed to draw it (position, size, origin, rotation, texture, ...)
entity.Get<DrawInfo>().Texture = resource;
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/DefaultEcs/DefaultEcs.Package.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<RepositoryType>git</RepositoryType>
<PackageTags>gamedev game-development game-engine ecs entity-component-system</PackageTags>

<Version>0.9.2-alpha3</Version>
<Version>0.9.2</Version>
<PackageReleaseNotes>
added IsAlive property on Entity
added With(Type[]) and Without(Type[]) on EntitySetBuilder
added managed resource helper class
added managed resource helper class (probably not final)
</PackageReleaseNotes>
</PropertyGroup>
</Project>

0 comments on commit f618e10

Please sign in to comment.