Making A Tree

This commit is contained in:
2026-02-25 18:04:55 -05:00
parent abccecd295
commit 32fdae3248
10 changed files with 27 additions and 6 deletions

View File

@@ -39,6 +39,13 @@ public abstract partial class Component : ComponentDocker
/// ///
internal List<Action> EventDelegates; internal List<Action> EventDelegates;
/// <summary>
///
/// </summary>
internal Type _type;
@@ -62,10 +69,11 @@ public abstract partial class Component : ComponentDocker
/// </summary> /// </summary>
/// <param name="__parent"> Docker that this spawned in this Component</param> /// <param name="__parent"> Docker that this spawned in this Component</param>
/// <param name="__name"> Name of the component</param> /// <param name="__name"> Name of the component</param>
internal void Initiate(ComponentDocker __parent, string __name, string[] __tags) { internal void Initiate(ComponentDocker __parent, string __name, ICollection<string> __tags) {
ComponentDocker = __parent; ComponentDocker = __parent;
Name = __name; Name = __name;
_tags = [..__tags]; _tags = [..__tags];
_type = GetType();
EventDelegates = new List<Action>(); for(int i = 0; i < Awperative.allEvents.Count; i++) EventDelegates.Add(null); EventDelegates = new List<Action>(); for(int i = 0; i < Awperative.allEvents.Count; i++) EventDelegates.Add(null);

View File

@@ -111,7 +111,7 @@ public abstract class ComponentDocker
/// <param name="__args"> Arguments to construct the Component with</param> /// <param name="__args"> Arguments to construct the Component with</param>
/// <typeparam name="__Type"> Type of Component to instantiate</typeparam> /// <typeparam name="__Type"> Type of Component to instantiate</typeparam>
/// <returns></returns> /// <returns></returns>
public __Type Add<__Type>(object[] __args, string name = "", string[] tags = null) where __Type : Component { public __Type Add<__Type>(IEnumerable<Object> __args, string name = "", ICollection<string> tags = null) where __Type : Component {
if(name == "") { name = typeof(__Type).Name; } if(name == "") { name = typeof(__Type).Name; }
if (tags == null) tags = []; if (tags == null) tags = [];
@@ -261,6 +261,7 @@ public abstract class ComponentDocker
/// <param name="__component"> Component to hash</param> /// <param name="__component"> Component to hash</param>
/// <param name="__tag"> Value to try and hash</param> /// <param name="__tag"> Value to try and hash</param>
internal void HashTaggedComponent(Component __component, string __tag) { internal void HashTaggedComponent(Component __component, string __tag) {
if (!__component._tags.Add(__tag)) { if (!__component._tags.Add(__tag)) {
Debug.LogError("Component already has tag!", ["Component", "Type", "Tag", "Docker"], Debug.LogError("Component already has tag!", ["Component", "Type", "Tag", "Docker"],

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@@ -18,7 +19,7 @@ public static class Awperative
/// <summary> /// <summary>
/// Current Version of Awperative /// Current Version of Awperative
/// </summary> /// </summary>
public static double Version = 1.10d; public static string Version = "1.2B";
@@ -34,6 +35,15 @@ public static class Awperative
/// </summary> /// </summary>
public static ImmutableArray<Scene> Scenes => [.._scenes]; public static ImmutableArray<Scene> Scenes => [.._scenes];
internal static HashSet<Scene> _scenes { get; private set; } = []; internal static HashSet<Scene> _scenes { get; private set; } = [];
public static bool IsRunning { get; private set; } = false;
public static bool IsStarted { get; private set; } = false;
public static bool DebugMode = false;

View File

@@ -27,4 +27,6 @@ A few modules have been given documentation and the website is currently underwa
--- ---
Awperative is officially moved to Open TK! Awperative is officially moved to Open TK!
# Awperative V1.2B

View File

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

View File

@@ -1 +1 @@
9247c7222c48f63b20f7850bc43f8a7199e69898cd844fe346be865677a16d9c eaefd8ded26140e2f41a812ea39f0e84a94c9d2484a5baede0586b90e9c4efcb