mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
refactoring to support c# 7.3
This commit is contained in:
parent
e5d6391630
commit
b0c0014faf
@ -55,7 +55,15 @@ namespace DCFApixels.DragonECS
|
||||
public abstract class DebugService
|
||||
{
|
||||
private static DebugService _instance;
|
||||
public static DebugService Instance => _instance ??= new DefaultDebugService();
|
||||
public static DebugService Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
_instance = new DefaultDebugService();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Set<T>() where T : DebugService, new() => Set(new T());
|
||||
public static void Set(DebugService service)
|
||||
|
@ -9,11 +9,11 @@ namespace DCFApixels.DragonECS
|
||||
public interface IEcsPool
|
||||
{
|
||||
#region Properties
|
||||
public int ComponentID { get; }
|
||||
public Type ComponentType { get; }
|
||||
public EcsWorld World { get; }
|
||||
public int Count { get; }
|
||||
public int Capacity { get; }
|
||||
int ComponentID { get; }
|
||||
Type ComponentType { get; }
|
||||
EcsWorld World { get; }
|
||||
int Count { get; }
|
||||
int Capacity { get; }
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
@ -127,7 +127,7 @@ namespace DCFApixels.DragonECS
|
||||
#region Reset/Copy interfaces
|
||||
public interface IEcsComponentReset<T>
|
||||
{
|
||||
public void Reset(ref T component);
|
||||
void Reset(ref T component);
|
||||
}
|
||||
public static class EcsComponentResetHandler<T>
|
||||
{
|
||||
@ -163,7 +163,7 @@ namespace DCFApixels.DragonECS
|
||||
|
||||
public interface IEcsComponentCopy<T>
|
||||
{
|
||||
public void Copy(ref T from, ref T to);
|
||||
void Copy(ref T from, ref T to);
|
||||
}
|
||||
public static class EcsComponentCopyHandler<T>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user