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,31 @@
namespace Awperative;
public abstract partial class Docker
{
public void Remove(Behavior behavior) {
if(!_components.Contains(behavior)) { Debug.LogError("Body does not have a component of this type"); return; }
behavior.End();
_components.Remove(behavior);
}
public void Remove<Generic>() where Generic : Behavior {
try
{
Behavior foundBehavior = Get<Generic>();
foundBehavior.End();
_components.Remove(foundBehavior);
}catch { Debug.LogError("Removal failed"); }
}
public void RemoveAll<Generic>() where Generic : Behavior {
try {
foreach (Behavior component in GetAll<Generic>()) {
component.End();
_components.Remove(component);
}
}catch { Debug.LogError("Removal failed"); }
}
}