Awperative Completely Reworked!

This commit is contained in:
2026-02-12 16:47:42 -05:00
parent 8bfc8437dc
commit fd4c07844b
25 changed files with 106 additions and 576 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace Awperative;
public abstract partial class Docker
{
public Behavior Get<Generic>() where Generic : Behavior => GetAll<Generic>()[0];
public Behavior[] GetAll<Generic>() where Generic : Behavior {
List<Behavior> returnValue = [];
foreach (Behavior component in _components)
if (component is Generic) returnValue.Add(component);
if(returnValue.Count == 0) { Debug.LogWarning("Scene has no components of this type"); return null; }
return returnValue.ToArray();
}
}