Merging Components And Behaviors

This commit is contained in:
2026-02-08 15:56:32 -05:00
parent a78b5aef96
commit 1df4b30967
20 changed files with 99 additions and 90 deletions

View File

@@ -7,14 +7,37 @@ namespace Awperative;
public static partial class Debug
{
/// <summary>
/// Writes the current message to the log file.
/// </summary>
/// <param name="__message"> Message to debug</param>
public static void LogAction(string __message) => LogGeneric(__message, "ACT", [], []);
/// <summary>
/// Writes the current message to the log file. With any given call sign.
/// </summary>
/// <param name="__message"> Message to debug</param>
/// <param name="__parameters"> Names of values to debug</param>
/// <param name="__values"> Values to debug</param>
public static void LogAction(string __message, string[] __parameters, string[] __values) => LogGeneric(__message, "ACT", __parameters, __values);
/// <summary>
/// Writes the current message to the log file if the condition is true.
/// </summary>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
public static void AssertAction(bool __condition, string __message) => AssertGeneric(__condition, __message, "ACT", [], []);
/// <summary>
/// Writes the current message to the log file.
/// </summary>
/// <param name="__message"> Message to debug</param>
public static void LogState(string __message) => LogGeneric(__message, "STA", [], []);
/// <summary>
/// Writes the current message to the log file. With any given call sign.
/// </summary>
@@ -22,6 +45,13 @@ public static partial class Debug
/// <param name="__parameters"> Names of values to debug</param>
/// <param name="__values"> Values to debug</param>
public static void LogState(string __message, string[] __parameters, string[] __values) => LogGeneric(__message, "STA", __parameters, __values);
/// <summary>
/// Writes the current message to the log file if the condition is true.
/// </summary>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
public static void AssertState(bool __condition, string __message) => AssertGeneric(__condition, __message, "STA", [], []);
@@ -33,8 +63,6 @@ public static partial class Debug
/// <param name="__message"> Message to debug</param>
public static void LogValue(string __message) => LogGeneric(__message, "VAL", [], []);
/// <summary>
/// Writes the current message to the log file. With any given call sign.
/// </summary>
@@ -42,6 +70,13 @@ public static partial class Debug
/// <param name="__parameters"> Names of values to debug</param>
/// <param name="__values"> Values to debug</param>
public static void LogValue(string __message, string[] __parameters, string[] __values) => LogGeneric(__message, "VAL", __parameters, __values);
/// <summary>
/// Writes the current message to the log file if the condition is true.
/// </summary>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
public static void AssertValue(bool __condition, string __message) => AssertGeneric(__condition, __message, "VAL", [], []);
@@ -53,8 +88,6 @@ public static partial class Debug
/// <param name="__message"> Message to debug</param>
public static void LogWarning(string __message) => LogGeneric(__message, "WAR", [], []);
/// <summary>
/// Writes the current message to the log file. With any given call sign.
/// </summary>
@@ -63,6 +96,13 @@ public static partial class Debug
/// <param name="__values"> Values to debug</param>
public static void LogWarning(string __message, string[] __parameters, string[] __values) => LogGeneric(__message, "WAR", __parameters, __values);
/// <summary>
/// Writes the current message to the log file if the condition is true.
/// </summary>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
public static void AssertWarning(bool __condition, string __message) => AssertGeneric(__condition, __message, "WAR", [], []);
@@ -73,8 +113,6 @@ public static partial class Debug
/// <param name="__message"> Message to debug</param>
public static void LogError(string __message) => LogGeneric(__message, "ERR", [], []);
/// <summary>
/// Writes the current message to the log file. With any given call sign.
/// </summary>
@@ -83,15 +121,12 @@ public static partial class Debug
/// <param name="__values"> Values to debug</param>
public static void LogError(string __message, string[] __parameters, string[] __values) => LogGeneric(__message, "ERR", __parameters, __values);
/// <summary>
/// Writes the current message to the log file.
/// Writes the current message to the log file if the condition is true.
/// </summary>
/// <param name="__message"> Message to debug</param>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
public static void AssertError(bool __condition, string __message) => AssertGeneric(__condition, __message, "ERR", [], []);
//todo: add more asserts and overrides
@@ -114,6 +149,17 @@ public static partial class Debug
}
/// <summary>
/// Writes the current message to the log file if the condition is true. With any given call sign.
/// </summary>
/// <param name="__condition"> Condition to debug </param>
/// <param name="__message"> Message to debug</param>
/// <param name="__callSign"> Message identifier</param>
/// <param name="__parameters"> Names of values to debug</param>
/// <param name="__values"> Values to debug</param>
public static void AssertGeneric(bool __condition, string __message, string __callSign, string[] __parameters, string[] __values) {
if (!__condition) return;
@@ -124,5 +170,4 @@ public static partial class Debug
File.AppendAllText(LogFilePath, output);
}
}

View File

@@ -15,7 +15,7 @@ public abstract class Component
//todo: add optional parameter for priority at creation
public int Priority {
get => _priority;
set { _priority = value; body.RecompileComponentOrder(); }
set { _priority = value; }
} private int _priority = 0;
@@ -42,11 +42,11 @@ public abstract class Component
public Generic AddComponent<Generic>() where Generic : Component => body.AddComponent<Generic>();
public Generic AddComponent<Generic>(object[] __args) where Generic : Component => body.AddComponent<Generic>(__args);
public Component AddComponent<Generic>() where Generic : Component => body.AddComponent<Generic>();
public Component AddComponent<Generic>(object[] __args) where Generic : Component => body.AddComponent<Generic>(__args);
public Generic GetComponent<Generic>() where Generic : Component => body.GetComponent<Generic>();
public Generic[] GetComponents<Generic>() where Generic : Component => body.GetComponents<Generic>();
public Component GetComponent<Generic>() where Generic : Component => body.GetComponent<Generic>();
public Component[] GetComponents<Generic>() where Generic : Component => body.GetComponents<Generic>();
public void RemoveComponent<Generic>() where Generic : Component => body.RemoveComponent<Generic>();
@@ -70,7 +70,7 @@ public abstract class Component
internal void Initiate(Body __body)
{
body = __body;
scene = __body.scene;
scene = __body.Scene;
Create();
}

View File

@@ -1,20 +1,20 @@
{
"format": 1,
"restore": {
"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj": {}
"/home/avery/Programming/Awperative/Awperative/Awperative.csproj": {}
},
"projects": {
"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj": {
"/home/avery/Programming/Awperative/Awperative/Awperative.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj",
"projectUniqueName": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"projectName": "Awperative",
"projectPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/obj/",
"projectPath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/home/avery/Programming/Awperative/Awperative/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config"
"/home/avery/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
@@ -32,13 +32,7 @@
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.300"
}
},
"frameworks": {
"net8.0": {
@@ -61,22 +55,12 @@
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.20, 8.0.20]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.20, 8.0.20]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"
}
}
}

View File

@@ -4,12 +4,12 @@
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/Users/averynorris/.nuget/packages/</NuGetPackageFolders>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/avery/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/avery/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/Users/averynorris/.nuget/packages/" />
<SourceRoot Include="/home/avery/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Awperative")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e987c8092f471ce03238b8612f7201ea93407653")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a78b5aef96c286d7f54b11963ffa6c3090398b85")]
[assembly: System.Reflection.AssemblyProductAttribute("Awperative")]
[assembly: System.Reflection.AssemblyTitleAttribute("Awperative")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
048fb6054ed9b529ea18f588fbae06b4c18cb6b3b2b0f2dfb5e7cef86db14863
5ebc44aa1d8b334bde6fb25c7d47f03612c55ffac27d8f46c1f104b7334054b4

View File

@@ -8,8 +8,6 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Awperative
build_property.ProjectDir = /Users/averynorris/RiderProjects/Awperative/Awperative/
build_property.ProjectDir = /home/avery/Programming/Awperative/Awperative/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -1 +1 @@
f552bda458f25e93b640f2f86a474c139ae16e84a42a47639427c638e2566334
0400c56c4a1b68e1972a170888bce3d3aee36f4c67a26871cb8491bbb0e074af

View File

@@ -273,19 +273,19 @@
]
},
"packageFolders": {
"/Users/averynorris/.nuget/packages/": {}
"/home/avery/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj",
"projectUniqueName": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"projectName": "Awperative",
"projectPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/Users/averynorris/.nuget/packages/",
"outputPath": "/Users/averynorris/RiderProjects/Awperative/Awperative/obj/",
"projectPath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"packagesPath": "/home/avery/.nuget/packages/",
"outputPath": "/home/avery/Programming/Awperative/Awperative/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/Users/averynorris/.nuget/NuGet/NuGet.Config"
"/home/avery/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net8.0"
@@ -303,13 +303,7 @@
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.300"
}
},
"frameworks": {
"net8.0": {
@@ -332,22 +326,12 @@
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[8.0.20, 8.0.20]"
},
{
"name": "Microsoft.NETCore.App.Ref",
"version": "[8.0.20, 8.0.20]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"
}
}
}

View File

@@ -1,17 +1,15 @@
{
"version": 2,
"dgSpecHash": "rY6Za5NlkX4=",
"dgSpecHash": "oHHZKOBBLTE=",
"success": true,
"projectFilePath": "/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj",
"projectFilePath": "/home/avery/Programming/Awperative/Awperative/Awperative.csproj",
"expectedPackageFiles": [
"/Users/averynorris/.nuget/packages/monogame.framework.desktopgl/3.8.4.1/monogame.framework.desktopgl.3.8.4.1.nupkg.sha512",
"/Users/averynorris/.nuget/packages/monogame.library.openal/1.24.3.2/monogame.library.openal.1.24.3.2.nupkg.sha512",
"/Users/averynorris/.nuget/packages/monogame.library.sdl/2.32.2.1/monogame.library.sdl.2.32.2.1.nupkg.sha512",
"/Users/averynorris/.nuget/packages/nvorbis/0.10.4/nvorbis.0.10.4.nupkg.sha512",
"/Users/averynorris/.nuget/packages/system.memory/4.5.3/system.memory.4.5.3.nupkg.sha512",
"/Users/averynorris/.nuget/packages/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg.sha512",
"/Users/averynorris/.nuget/packages/microsoft.netcore.app.ref/8.0.20/microsoft.netcore.app.ref.8.0.20.nupkg.sha512",
"/Users/averynorris/.nuget/packages/microsoft.aspnetcore.app.ref/8.0.20/microsoft.aspnetcore.app.ref.8.0.20.nupkg.sha512"
"/home/avery/.nuget/packages/monogame.framework.desktopgl/3.8.4.1/monogame.framework.desktopgl.3.8.4.1.nupkg.sha512",
"/home/avery/.nuget/packages/monogame.library.openal/1.24.3.2/monogame.library.openal.1.24.3.2.nupkg.sha512",
"/home/avery/.nuget/packages/monogame.library.sdl/2.32.2.1/monogame.library.sdl.2.32.2.1.nupkg.sha512",
"/home/avery/.nuget/packages/nvorbis/0.10.4/nvorbis.0.10.4.nupkg.sha512",
"/home/avery/.nuget/packages/system.memory/4.5.3/system.memory.4.5.3.nupkg.sha512",
"/home/avery/.nuget/packages/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg.sha512"
],
"logs": []
}

View File

@@ -1 +1 @@
"restore":{"projectUniqueName":"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj","projectName":"Awperative","projectPath":"/Users/averynorris/RiderProjects/Awperative/Awperative/Awperative.csproj","outputPath":"/Users/averynorris/RiderProjects/Awperative/Awperative/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"},"SdkAnalysisLevel":"9.0.300"}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MonoGame.Framework.DesktopGL":{"suppressParent":"All","target":"Package","version":"[3.8.*, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"downloadDependencies":[{"name":"Microsoft.AspNetCore.App.Ref","version":"[8.0.20, 8.0.20]"},{"name":"Microsoft.NETCore.App.Ref","version":"[8.0.20, 8.0.20]"}],"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/local/share/dotnet/sdk/9.0.305/PortableRuntimeIdentifierGraph.json"}}
"restore":{"projectUniqueName":"/home/avery/Programming/Awperative/Awperative/Awperative.csproj","projectName":"Awperative","projectPath":"/home/avery/Programming/Awperative/Awperative/Awperative.csproj","outputPath":"/home/avery/Programming/Awperative/Awperative/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MonoGame.Framework.DesktopGL":{"suppressParent":"All","target":"Package","version":"[3.8.*, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/usr/lib/dotnet/sdk/8.0.123/PortableRuntimeIdentifierGraph.json"}}

View File

@@ -1 +1 @@
17705737329502274
17705828120140388