├── .gitignore ├── src ├── HealthComponent.cs ├── Program.cs └── MyProject.csproj ├── jenny ├── Program.cs └── MyProject.CodeGenerator.csproj ├── README.md ├── MyProject.sln └── Jenny.properties /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.userproperties 3 | bin 4 | obj 5 | .idea 6 | src/Generated 7 | -------------------------------------------------------------------------------- /src/HealthComponent.cs: -------------------------------------------------------------------------------- 1 | using Entitas; 2 | 3 | public sealed class HealthComponent : IComponent 4 | { 5 | public int Value; 6 | } 7 | -------------------------------------------------------------------------------- /jenny/Program.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject.CodeGenerator; 2 | 3 | public static class Program 4 | { 5 | public static void Main(string[] args) 6 | { 7 | Jenny.Generator.Cli.Program.Main(args); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Program.cs: -------------------------------------------------------------------------------- 1 | namespace MyProject; 2 | 3 | class Program 4 | { 5 | public static void Main(string[] args) 6 | { 7 | var contexts = Contexts.sharedInstance; 8 | var e = contexts.game.CreateEntity(); 9 | e.AddHealth(100); 10 | 11 | System.Console.WriteLine("e.health.value: " + e.health.Value); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/MyProject.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jenny/MyProject.CodeGenerator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | en-US 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Entitas-Standalone 2 | 3 | Entitas-Standalone is a pure C# console app using [Entitas](https://github.com/sschmid/Entitas). 4 | 5 | There are two project in the solution: 6 | 7 | ## src/MyProject.csproj 8 | This is a minimal sample project using one generated component. 9 | 10 | ## jenny/MyProject.Jenny.csproj 11 | Use this project to build the code generator called Jenny. 12 | 13 | To start the server please run: 14 | 15 | ``` 16 | dotnet run -c Release --project jenny/MyProject.CodeGenerator.csproj server 17 | ``` 18 | 19 | To generate code using the server please run 20 | 21 | ``` 22 | dotnet jenny/bin/Release/net6.0/MyProject.CodeGenerator.dll client gen 23 | ``` 24 | -------------------------------------------------------------------------------- /MyProject.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # 3 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject", "src/MyProject.csproj", "{1BE53A8B-ED94-48D8-86C1-59687E88180E}" 4 | EndProject 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyProject.CodeGenerator", "jenny\MyProject.CodeGenerator.csproj", "{1BE53A8B-ED94-48D8-86C1-59687E88180E}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {1BE53A8B-ED94-48D8-86C1-59687E88180E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {1BE53A8B-ED94-48D8-86C1-59687E88180E}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {1BE53A8B-ED94-48D8-86C1-59687E88180E}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {1BE53A8B-ED94-48D8-86C1-59687E88180E}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | EndGlobal 19 | -------------------------------------------------------------------------------- /Jenny.properties: -------------------------------------------------------------------------------- 1 | Jenny.SearchPaths = jenny/bin/Release/net6.0 2 | Jenny.Plugins = Entitas.CodeGeneration.Plugins, \ 3 | Entitas.Roslyn.CodeGeneration.Plugins, \ 4 | Entitas.VisualDebugging.CodeGeneration.Plugins, \ 5 | Jenny.Plugins, \ 6 | Jenny.Plugins.Unity 7 | Jenny.PreProcessors = Jenny.Plugins.ValidateProjectPathPreProcessor 8 | Jenny.DataProviders = Entitas.CodeGeneration.Plugins.ContextDataProvider, \ 9 | Entitas.Roslyn.CodeGeneration.Plugins.CleanupDataProvider, \ 10 | Entitas.Roslyn.CodeGeneration.Plugins.ComponentDataProvider, \ 11 | Entitas.Roslyn.CodeGeneration.Plugins.EntityIndexDataProvider 12 | Jenny.CodeGenerators = Entitas.CodeGeneration.Plugins.ComponentContextApiGenerator, \ 13 | Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator, \ 14 | Entitas.CodeGeneration.Plugins.ComponentEntityApiInterfaceGenerator, \ 15 | Entitas.CodeGeneration.Plugins.ComponentGenerator, \ 16 | Entitas.CodeGeneration.Plugins.ComponentLookupGenerator, \ 17 | Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator, \ 18 | Entitas.CodeGeneration.Plugins.ContextAttributeGenerator, \ 19 | Entitas.CodeGeneration.Plugins.ContextGenerator, \ 20 | Entitas.CodeGeneration.Plugins.ContextMatcherGenerator, \ 21 | Entitas.CodeGeneration.Plugins.ContextsGenerator, \ 22 | Entitas.CodeGeneration.Plugins.EntityGenerator, \ 23 | Entitas.CodeGeneration.Plugins.EntityIndexGenerator, \ 24 | Entitas.CodeGeneration.Plugins.EventEntityApiGenerator, \ 25 | Entitas.CodeGeneration.Plugins.EventListenerComponentGenerator, \ 26 | Entitas.CodeGeneration.Plugins.EventListenerInterfaceGenerator, \ 27 | Entitas.CodeGeneration.Plugins.EventSystemGenerator, \ 28 | Entitas.CodeGeneration.Plugins.EventSystemsGenerator, \ 29 | Entitas.Roslyn.CodeGeneration.Plugins.CleanupSystemGenerator, \ 30 | Entitas.Roslyn.CodeGeneration.Plugins.CleanupSystemsGenerator, \ 31 | Entitas.VisualDebugging.CodeGeneration.Plugins.ContextObserverGenerator, \ 32 | Entitas.VisualDebugging.CodeGeneration.Plugins.FeatureClassGenerator 33 | Jenny.PostProcessors = Jenny.Plugins.AddFileHeaderPostProcessor, \ 34 | Jenny.Plugins.CleanTargetDirectoryPostProcessor, \ 35 | Jenny.Plugins.MergeFilesPostProcessor, \ 36 | Jenny.Plugins.WriteToDiskPostProcessor, \ 37 | Jenny.Plugins.ConsoleWriteLinePostProcessor 38 | Jenny.Server.Port = 3333 39 | Jenny.Client.Host = localhost 40 | Jenny.Plugins.ProjectPath = src/MyProject.csproj 41 | Entitas.CodeGeneration.Plugins.Contexts = Game 42 | Entitas.CodeGeneration.Plugins.IgnoreNamespaces = false 43 | Jenny.Plugins.TargetDirectory = src/Generated 44 | --------------------------------------------------------------------------------