diff --git a/README.md b/README.md index 857a252f..ee131183 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ DefaultEcs is an [Entity Component System](https://en.wikipedia.org/wiki/Entity_ [![NuGet](https://buildstats.info/nuget/DefaultEcs)](https://www.nuget.org/packages/DefaultEcs) [![Coverage Status](https://coveralls.io/repos/github/Doraku/DefaultEcs/badge.svg?branch=master)](https://coveralls.io/github/Doraku/DefaultEcs?branch=master) ![continuous integration status](https://github.com/doraku/defaultecs/workflows/continuous%20integration/badge.svg) +[![preview package](https://img.shields.io/badge/preview-package-blue?style=flat&logo=github)](https://github.com/Doraku/DefaultEcs/packages/26448) - [Requirement](#Requirement) - [Versioning](#Versioning) diff --git a/documentation/RELEASENOTE.md b/documentation/RELEASENOTE.md index ecda6123..12822f73 100644 --- a/documentation/RELEASENOTE.md +++ b/documentation/RELEASENOTE.md @@ -1,3 +1,15 @@ +## DefaultEcs 0.12.1 +fixed serialization of struct as an object +fixed serialization of Type +fixed AResourceManager.Manage for existing entities + +added netstandard2.1 target +added == and != operators on Entity +added internal version on Entity, Entity.IsAlive will return false if a stored disposed entity is reused +added a helper ManagedResource static class to create ManagedResource + +[nuget package](https://www.nuget.org/packages/DefaultEcs/0.12.1) + ## DefaultEcs 0.12.0 breaking change: renamed EntitySetBuilder.WithAny and WithAny attribute to WithEither diff --git a/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo).md b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo).md new file mode 100644 index 00000000..c6b00175 --- /dev/null +++ b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo).md @@ -0,0 +1,20 @@ +#### [DefaultEcs](./index.md 'index') +### [DefaultEcs.Resource](./DefaultEcs-Resource.md 'DefaultEcs.Resource').[ManagedResource<TResource>](./DefaultEcs-Resource-ManagedResource-TResource-.md 'DefaultEcs.Resource.ManagedResource<TResource>') +## ManagedResource<TResource>.Create<TInfo>(TInfo) Method +Create a [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') object +```C# +public static DefaultEcs.Resource.ManagedResource Create(TInfo info); +``` +#### Type parameters + +`TInfo` +The infos used to identify the resources. + +#### Parameters + +`info` [TInfo](#DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo)-TInfo 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo).TInfo') +The info used to identify the resource. + +#### Returns +[DefaultEcs.Resource.ManagedResource<](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>')[TInfo](#DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo)-TInfo 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo).TInfo')[,](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>')[TResource](./DefaultEcs-Resource-ManagedResource-TResource-.md#DefaultEcs-Resource-ManagedResource-TResource--TResource 'DefaultEcs.Resource.ManagedResource<TResource>.TResource')[>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') +The [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') object. diff --git a/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--).md b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--).md new file mode 100644 index 00000000..b335a24a --- /dev/null +++ b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--).md @@ -0,0 +1,20 @@ +#### [DefaultEcs](./index.md 'index') +### [DefaultEcs.Resource](./DefaultEcs-Resource.md 'DefaultEcs.Resource').[ManagedResource<TResource>](./DefaultEcs-Resource-ManagedResource-TResource-.md 'DefaultEcs.Resource.ManagedResource<TResource>') +## ManagedResource<TResource>.Create<TInfo>(TInfo[]) Method +Create a [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') object with multiple infos. +```C# +public static DefaultEcs.Resource.ManagedResource Create(params TInfo[] infos); +``` +#### Type parameters + +`TInfo` +The infos used to identify the resources. + +#### Parameters + +`infos` [TInfo](#DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--)-TInfo 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo[]).TInfo')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array') +The type used to identify a resource. + +#### Returns +[DefaultEcs.Resource.ManagedResource<](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>')[TInfo](#DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--)-TInfo 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo[]).TInfo')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array')[,](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>')[TResource](./DefaultEcs-Resource-ManagedResource-TResource-.md#DefaultEcs-Resource-ManagedResource-TResource--TResource 'DefaultEcs.Resource.ManagedResource<TResource>.TResource')[>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') +The [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') object. diff --git a/documentation/api/DefaultEcs-Resource-ManagedResource-TResource-.md b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource-.md new file mode 100644 index 00000000..e09c094a --- /dev/null +++ b/documentation/api/DefaultEcs-Resource-ManagedResource-TResource-.md @@ -0,0 +1,16 @@ +#### [DefaultEcs](./index.md 'index') +### [DefaultEcs.Resource](./DefaultEcs-Resource.md 'DefaultEcs.Resource') +## ManagedResource<TResource> Class +Provides static methods for creating [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') object. +```C# +public static class ManagedResource +``` +Inheritance [System.Object](https://docs.microsoft.com/en-us/dotnet/api/System.Object 'System.Object') > [ManagedResource<TResource>](./DefaultEcs-Resource-ManagedResource-TResource-.md 'DefaultEcs.Resource.ManagedResource<TResource>') +#### Type parameters + +`TResource` +The type of the resource. + +### Methods +- [Create<TInfo>(TInfo)](./DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo).md 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo)') +- [Create<TInfo>(TInfo[])](./DefaultEcs-Resource-ManagedResource-TResource--Create-TInfo-(TInfo--).md 'DefaultEcs.Resource.ManagedResource<TResource>.Create<TInfo>(TInfo[])') diff --git a/documentation/api/DefaultEcs-Resource.md b/documentation/api/DefaultEcs-Resource.md index dfdb7aac..adafcf0c 100644 --- a/documentation/api/DefaultEcs-Resource.md +++ b/documentation/api/DefaultEcs-Resource.md @@ -3,5 +3,6 @@ The [DefaultEcs.Resource](./DefaultEcs-Resource.md 'DefaultEcs.Resource') namespace contains types used in the loading of unmanaged resources needed as components. ### Classes - [AResourceManager<TInfo,TResource>](./DefaultEcs-Resource-AResourceManager-TInfo_TResource-.md 'DefaultEcs.Resource.AResourceManager<TInfo,TResource>') +- [ManagedResource<TResource>](./DefaultEcs-Resource-ManagedResource-TResource-.md 'DefaultEcs.Resource.ManagedResource<TResource>') ### Structs - [ManagedResource<TInfo,TResource>](./DefaultEcs-Resource-ManagedResource-TInfo_TResource-.md 'DefaultEcs.Resource.ManagedResource<TInfo,TResource>') diff --git a/source/DefaultEcs/DefaultEcs.Release.csproj b/source/DefaultEcs/DefaultEcs.Release.csproj index f843c484..e8d16eca 100644 --- a/source/DefaultEcs/DefaultEcs.Release.csproj +++ b/source/DefaultEcs/DefaultEcs.Release.csproj @@ -11,7 +11,7 @@ - 0.12.1-alpha1 + 0.12.1 fixed serialization of struct as an object fixed serialization of Type