mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 18:14:37 +08:00
update component interfaaces
This commit is contained in:
parent
3986149267
commit
b331f4fda1
@ -3,7 +3,7 @@
|
||||
#endif
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace DCFApixels.DragonECS
|
||||
namespace DCFApixels.DragonECS.Core
|
||||
{
|
||||
#region IEcsWorldComponent
|
||||
public interface IEcsWorldComponent<T>
|
||||
@ -44,11 +44,11 @@ namespace DCFApixels.DragonECS
|
||||
void Enable(ref T component);
|
||||
void Disable(ref T component);
|
||||
}
|
||||
public static class EcsComponentResetHandler<T>
|
||||
public static class EcsComponentLifecycleHandler<T>
|
||||
{
|
||||
public static readonly IEcsComponentLifecycle<T> instance;
|
||||
public static readonly bool isHasHandler;
|
||||
static EcsComponentResetHandler()
|
||||
static EcsComponentLifecycleHandler()
|
||||
{
|
||||
T def = default;
|
||||
if (def is IEcsComponentLifecycle<T> intrf)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#if DISABLE_DEBUG
|
||||
#undef DEBUG
|
||||
#endif
|
||||
using DCFApixels.DragonECS.Core;
|
||||
using DCFApixels.DragonECS.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -45,8 +45,8 @@ namespace DCFApixels.DragonECS
|
||||
private int[] _recycledItems;
|
||||
private int _recycledItemsCount = 0;
|
||||
|
||||
private readonly IEcsComponentLifecycle<T> _componentLifecycleHandler = EcsComponentResetHandler<T>.instance;
|
||||
private readonly bool _isHasComponentLifecycleHandler = EcsComponentResetHandler<T>.isHasHandler;
|
||||
private readonly IEcsComponentLifecycle<T> _componentLifecycleHandler = EcsComponentLifecycleHandler<T>.instance;
|
||||
private readonly bool _isHasComponentLifecycleHandler = EcsComponentLifecycleHandler<T>.isHasHandler;
|
||||
private readonly IEcsComponentCopy<T> _componentCopyHandler = EcsComponentCopyHandler<T>.instance;
|
||||
private readonly bool _isHasComponentCopyHandler = EcsComponentCopyHandler<T>.isHasHandler;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user