Jaydon.SunflowerECS
1.0.2
dotnet add package Jaydon.SunflowerECS --version 1.0.2
NuGet\Install-Package Jaydon.SunflowerECS -Version 1.0.2
<PackageReference Include="Jaydon.SunflowerECS" Version="1.0.2" />
<PackageVersion Include="Jaydon.SunflowerECS" Version="1.0.2" />
<PackageReference Include="Jaydon.SunflowerECS" />
paket add Jaydon.SunflowerECS --version 1.0.2
#r "nuget: Jaydon.SunflowerECS, 1.0.2"
#:package Jaydon.SunflowerECS@1.0.2
#addin nuget:?package=Jaydon.SunflowerECS&version=1.0.2
#tool nuget:?package=Jaydon.SunflowerECS&version=1.0.2
SunflowerECS
SunflowerECS is a hybrid entity-component library designed to be used in whatever kind of C# application you wish.<br> ...The name is probably a little misleading now, huh?
Requirements
- .NET 8.0 or later
How to Build
If using Visual Studio, open the solution. Then, press F6 or click Build>Build Solution:
If using a terminal, open the folder containing the solution. Then type the following:
How to Use
Create a Scene:
Scene scene = new Scene();
Create your custom component types.<br><br>
Create a custom system based on IUpdateSystem and/or IDrawSystem.
Example:
scene.AddSystem(new BehaviourSystem());
BehaviourSystem is a type built into this library.
In order to use it in your application, use:
scene.UpdateBehaviour();
and
scene.DrawBehaviour();
To use your own systems in the same manner, use:
scene.UpdateGeneral();
and
scene.DrawGeneral();
Create an Entity by doing this:
Entity entity = scene.Create();
The Entity in question will have a randomly generated ID.
Attach components by using:
entity.AddComponent<YourComponentType>();
You can store the instance by using:
var yourComponent = entity.AddComponent<YourComponentType>();
Alternatively, you can add an existing component by using:
entity.AddComponent<YourComponentType>(yourComponent);
To remove them, use:
entity.RemoveComponent<YourComponentType>(yourComponent);
To retrieve them, use:
entity.GetComponent<YourComponentType>();
How to Contribute
If you wish to modify this to implement specific things in your own project, feel free to clone the repo and modify it from there!<br> Credits would be nice, but are not required.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.