mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
Merge branch 'dev' into next_version
This commit is contained in:
commit
5c6c440db6
@ -10,7 +10,7 @@
|
|||||||
<RootNamespace>DCFApixels.DragonECS</RootNamespace>
|
<RootNamespace>DCFApixels.DragonECS</RootNamespace>
|
||||||
|
|
||||||
<Title>DragonECS</Title>
|
<Title>DragonECS</Title>
|
||||||
<Version>0.9.13</Version>
|
<Version>0.9.14</Version>
|
||||||
<Authors>DCFApixels</Authors>
|
<Authors>DCFApixels</Authors>
|
||||||
<Description>ECS Framework for Game Engines with C# and .Net Platform</Description>
|
<Description>ECS Framework for Game Engines with C# and .Net Platform</Description>
|
||||||
<Copyright>DCFApixels</Copyright>
|
<Copyright>DCFApixels</Copyright>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"displayName": "DragonECS",
|
"displayName": "DragonECS",
|
||||||
"description": "C# Entity Component System Framework",
|
"description": "C# Entity Component System Framework",
|
||||||
"unity": "2020.3",
|
"unity": "2020.3",
|
||||||
"version": "0.9.13",
|
"version": "0.9.14",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/DCFApixels/DragonECS.git"
|
"url": "https://github.com/DCFApixels/DragonECS.git"
|
||||||
|
@ -89,7 +89,12 @@ namespace DCFApixels.DragonECS
|
|||||||
#else
|
#else
|
||||||
false;
|
false;
|
||||||
#endif
|
#endif
|
||||||
|
public const bool ENABLE_DUMMY_SPAN =
|
||||||
|
#if ENABLE_DUMMY_SPAN
|
||||||
|
true;
|
||||||
|
#else
|
||||||
|
false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
[Obsolete("DRAGONECS_ENABLE_DEBUG_SERVICE")]
|
[Obsolete("DRAGONECS_ENABLE_DEBUG_SERVICE")]
|
||||||
@ -119,13 +124,6 @@ namespace DCFApixels.DragonECS
|
|||||||
true;
|
true;
|
||||||
#else
|
#else
|
||||||
false;
|
false;
|
||||||
#endif
|
|
||||||
[Obsolete]
|
|
||||||
public const bool ENABLE_DUMMY_SPAN =
|
|
||||||
#if ENABLE_DUMMY_SPAN
|
|
||||||
true;
|
|
||||||
#else
|
|
||||||
false;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,16 @@ namespace DCFApixels.DragonECS.Core.Internal
|
|||||||
}
|
}
|
||||||
public static unsafe void ClearAllocatedMemory(byte* ptr, int startByte, int lengthInBytes)
|
public static unsafe void ClearAllocatedMemory(byte* ptr, int startByte, int lengthInBytes)
|
||||||
{
|
{
|
||||||
|
#if ENABLE_DUMMY_SPAN
|
||||||
|
lengthInBytes += startByte;
|
||||||
|
for (int i = startByte; i < lengthInBytes; i++)
|
||||||
|
{
|
||||||
|
ptr[i] = 0;
|
||||||
|
}
|
||||||
|
#else
|
||||||
Span<byte> memorySpan = new Span<byte>(ptr + startByte, lengthInBytes);
|
Span<byte> memorySpan = new Span<byte>(ptr + startByte, lengthInBytes);
|
||||||
memorySpan.Clear();
|
memorySpan.Clear();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,19 +84,17 @@ namespace DCFApixels.DragonECS.Core.Unchecked
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
internal class EntityDebuggerProxy
|
internal class EntityDebuggerProxy
|
||||||
{
|
{
|
||||||
private List<object> _componentsList = new List<object>();
|
private List<object> _componentsList = new List<object>();
|
||||||
private EntitySlotInfo _info;
|
private EntitySlotInfo _info;
|
||||||
public long full { get { return _info.full; } }
|
public virtual long full { get { return _info.full; } }
|
||||||
public int id { get { return _info.id; } }
|
public virtual int id { get { return _info.id; } }
|
||||||
public short gen { get { return _info.gen; } }
|
public virtual short gen { get { return _info.gen; } }
|
||||||
public short worldID { get { return _info.worldID; } }
|
public virtual short worldID { get { return _info.worldID; } }
|
||||||
public EntitySlotInfo.StateFlag State { get { return _info.State; } }
|
public virtual EntitySlotInfo.StateFlag State { get { return _info.State; } }
|
||||||
public EcsWorld World { get { return _info.World; } }
|
public virtual EcsWorld World { get { return _info.World; } }
|
||||||
public IEnumerable<object> Components
|
public virtual IEnumerable<object> Components
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -129,6 +127,10 @@ namespace DCFApixels.DragonECS.Core.Unchecked
|
|||||||
{
|
{
|
||||||
_info = info;
|
_info = info;
|
||||||
}
|
}
|
||||||
|
public EntityDebuggerProxy(entlong info)
|
||||||
|
{
|
||||||
|
_info = (EntitySlotInfo)info;
|
||||||
|
}
|
||||||
public EntityDebuggerProxy(int entityID, short gen, short worldID)
|
public EntityDebuggerProxy(int entityID, short gen, short worldID)
|
||||||
{
|
{
|
||||||
_info = new EntitySlotInfo(entityID, gen, worldID);
|
_info = new EntitySlotInfo(entityID, gen, worldID);
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
using DCFApixels.DragonECS.Core.Internal;
|
using DCFApixels.DragonECS.Core.Internal;
|
||||||
using DCFApixels.DragonECS.Core.Unchecked;
|
using DCFApixels.DragonECS.Core.Unchecked;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
@ -47,7 +48,7 @@ namespace DCFApixels.DragonECS
|
|||||||
public bool IsAlive
|
public bool IsAlive
|
||||||
{
|
{
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return EcsWorld.TryGetWorld(_world, out EcsWorld world) && world.IsAlive(_id, _gen);
|
return EcsWorld.TryGetWorld(_world, out EcsWorld world) && world.IsAlive(_id, _gen);
|
||||||
}
|
}
|
||||||
@ -391,7 +392,14 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
internal class DebuggerProxy : EntityDebuggerProxy
|
internal class DebuggerProxy : EntityDebuggerProxy
|
||||||
{
|
{
|
||||||
public DebuggerProxy(entlong entity) : base(entity._id, entity._gen, entity._world) { }
|
public override long full => base.full;
|
||||||
|
public override int id => base.id;
|
||||||
|
public override short gen => base.gen;
|
||||||
|
public override short worldID => base.worldID;
|
||||||
|
public override EntitySlotInfo.StateFlag State => base.State;
|
||||||
|
public override EcsWorld World => base.World;
|
||||||
|
public override IEnumerable<object> Components { get => base.Components; set => base.Components = value; }
|
||||||
|
public DebuggerProxy(entlong entity) : base(entity) { }
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user