This commit is contained in:
2025-04-14 23:22:38 +02:00
parent 72b8a37345
commit 1e190fe94b
166 changed files with 2989 additions and 687 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using JetBrains.Annotations;
namespace RebootKit.Engine.Foundation {
public interface IController : IDisposable {
@@ -25,6 +26,16 @@ namespace RebootKit.Engine.Foundation {
}
}
public T Get<T>() where T : class, IController {
foreach (TController controller in _controllers) {
if (controller is T res) {
return res;
}
}
return null;
}
public bool TryFind<T>(out T outController) where T : IController {
foreach (TController controller in _controllers) {
if (controller is T res) {