This commit is contained in:
CortexCore
2025-03-15 20:09:18 +08:00
parent 7979e09be4
commit 824ff2e4c7
106 changed files with 4793 additions and 1618 deletions

View File

@@ -13,6 +13,7 @@ namespace BITKit.Entities
[DefaultExecutionOrder(-1)]
public class UnityEntity : MonoBehaviour,IEntity
{
[SerializeField] private bool debug;
private IEntitiesService _entitiesService;
private IEntity _entity;
@@ -22,6 +23,11 @@ namespace BITKit.Entities
if (_entitiesService.Entities.ContainsKey(gameObject.GetInstanceID())) return;
if (debug)
{
}
var entity = new Entity()
{
Id = gameObject.GetInstanceID(),
@@ -40,6 +46,8 @@ namespace BITKit.Entities
{
if(!component)continue;
var type = component.GetType();
entity.ServiceCollection.AddSingleton(type, component);
foreach (var x in type.GetInterfaces())
{