using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using BITKit.Entities;
using UnityEngine;
namespace BITKit.Entities
{
/// Entity接口,用于复杂实体
public interface IUnityEntity :Entities.IEntity,IGenericEvent, IDatabase
{
void AddService(T service);
void AddService(object service);
void AddService(Type type, object service);
}
// public class IEntityReader : NetMessageReader
// {
// public override IUnityEntity ReadBinary(BinaryReader reader)
// {
// var id = reader.ReadInt32();
// var path = reader.ReadString();
// var entity = DI.Get().Entities[id];
// return (IUnityEntity)entity;
// }
// public override void WriteBinary(BinaryWriter writer, IUnityEntity value)
// {
// writer.Write(value.Id);
// writer.Write(value.Id);
// }
// private IUnityEntity Create(int id, string path)
// {
// var entity = Addressables
// .LoadAssetAsync(path)
// .WaitForCompletion()
// .GetComponent();
// return entity;
// }
// }
}