This commit is contained in:
CortexCore
2023-11-15 23:55:06 +08:00
parent 5446067f91
commit 70247f0242
82 changed files with 3271 additions and 579 deletions

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace BITKit.Entities
{
public interface IdComponent
{
ulong Id { get; }
string Name { get; }
}
public class UnityIdComponent : EntityBehavior,IdComponent
{
[SerializeField] private ulong id;
[SerializeField] private string unityName;
public ulong Id => id;
public string Name => unityName;
public override void Initialize(IEntity _entity)
{
base.Initialize(_entity);
id = _entity.Id;
}
}
}