1
This commit is contained in:
@@ -4,7 +4,7 @@ using System.ComponentModel.Design;
|
||||
#if NET5_0_OR_GREATER
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
#endif
|
||||
namespace BITKit.Core.Entites
|
||||
namespace BITKit.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// 基本实体
|
||||
@@ -17,19 +17,31 @@ namespace BITKit.Core.Entites
|
||||
IEntityComponent[] Components { get; }
|
||||
bool RegisterComponent<T>(T component);
|
||||
IServiceProvider ServiceProvider { get; }
|
||||
#if NET5_0_OR_GREATER
|
||||
IServiceCollection ServiceCollection { get; }
|
||||
#endif
|
||||
void Inject(object obj);
|
||||
}
|
||||
/// <summary>
|
||||
/// 基本实体组件
|
||||
/// </summary>
|
||||
public interface IEntityComponent:IAwake,IStart
|
||||
public interface IEntityComponent
|
||||
{
|
||||
Type BaseType { get; }
|
||||
IEntity Entity { get; set; }
|
||||
#if NET5_0_OR_GREATER
|
||||
void BuildService(IServiceCollection serviceCollection);
|
||||
#endif
|
||||
}
|
||||
public interface IEntityBehavior:IEntityComponent
|
||||
{
|
||||
void Initialize(IEntity _entity);
|
||||
void OnAwake();
|
||||
void OnStart();
|
||||
void OnUpdate(float deltaTime);
|
||||
void OnFixedUpdate(float deltaTime);
|
||||
void OnLateUpdate(float deltaTime);
|
||||
void OnDestroyComponent();
|
||||
}
|
||||
/// <summary>
|
||||
/// 基本实体服务
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user