update mask debugger

This commit is contained in:
Mikhail 2026-03-17 14:52:32 +08:00
parent 37718d354a
commit 56fed70c15

View File

@ -437,15 +437,18 @@ namespace DCFApixels.DragonECS
public readonly int ID; public readonly int ID;
public readonly EcsWorld world; public readonly EcsWorld world;
private readonly short _worldID; private readonly short _worldID;
public readonly EcsMaskChunck[] includedChunkMasks; public readonly EcsMaskChunck[] incsChunkMasks;
public readonly EcsMaskChunck[] excludedChunkMasks; public readonly EcsMaskChunck[] excsChunkMasks;
public readonly EcsMaskChunck[] anyChunkMasks; public readonly EcsMaskChunck[] anysChunkMasks;
public readonly int[] included; public readonly int[] incs;
public readonly int[] excluded; public readonly int[] excs;
public readonly int[] any; public readonly int[] anys;
public readonly Type[] includedTypes; public readonly Type[] incsTypes;
public readonly Type[] excludedTypes; public readonly Type[] excsTypes;
public readonly Type[] anyTypes; public readonly Type[] anysTypes;
public readonly IEcsPool[] incsPools;
public readonly IEcsPool[] excsPools;
public readonly IEcsPool[] anysPools;
public bool IsEmpty { get { return _source.IsEmpty; } } public bool IsEmpty { get { return _source.IsEmpty; } }
public bool IsBroken { get { return _source.IsBroken; } } public bool IsBroken { get { return _source.IsBroken; } }
@ -457,20 +460,24 @@ namespace DCFApixels.DragonECS
ID = mask.ID; ID = mask.ID;
world = EcsWorld.GetWorld(mask.WorldID); world = EcsWorld.GetWorld(mask.WorldID);
_worldID = mask.WorldID; _worldID = mask.WorldID;
includedChunkMasks = mask._incChunckMasks; incsChunkMasks = mask._incChunckMasks;
excludedChunkMasks = mask._excChunckMasks; excsChunkMasks = mask._excChunckMasks;
anyChunkMasks = mask._anyChunckMasks; anysChunkMasks = mask._anyChunckMasks;
included = mask._incs; incs = mask._incs;
excluded = mask._excs; excs = mask._excs;
any = mask._anys; anys = mask._anys;
Type converter(int o) { return world.GetComponentType(o); } Type converter(int o) { return world.GetComponentType(o); }
includedTypes = included.Select(converter).ToArray(); IEcsPool converterPool(int o) { return world.FindPoolInstance(o); }
excludedTypes = excluded.Select(converter).ToArray(); incsTypes = incs.Select(converter).ToArray();
anyTypes = any.Select(converter).ToArray(); excsTypes = excs.Select(converter).ToArray();
anysTypes = anys.Select(converter).ToArray();
incsPools = incs.Select(converterPool).ToArray();
excsPools = excs.Select(converterPool).ToArray();
anysPools = anys.Select(converterPool).ToArray();
} }
public override string ToString() public override string ToString()
{ {
return CreateLogString(_worldID, included, excluded, any); return CreateLogString(_worldID, incs, excs, anys);
} }
} }
#endregion #endregion