Add managed entity and script component.
Added ManagedEntity and related methods in EntityManager; Added ScriptComponent to write game play logic in oop;
This commit is contained in:
@@ -49,7 +49,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 1; index++)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -216,7 +216,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 2; index++)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -393,7 +393,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 3; index++)
|
||||
{
|
||||
@@ -409,7 +409,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -580,7 +580,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 4; index++)
|
||||
{
|
||||
@@ -596,7 +596,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -777,7 +777,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 5; index++)
|
||||
{
|
||||
@@ -793,7 +793,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -984,7 +984,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 6; index++)
|
||||
{
|
||||
@@ -1000,7 +1000,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -1201,7 +1201,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 7; index++)
|
||||
{
|
||||
@@ -1217,7 +1217,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
@@ -1428,7 +1428,7 @@ public unsafe partial struct EntityQuery
|
||||
{
|
||||
_currentChunk = ref _currentArchetype.GetChunkReference(chunkIndex);
|
||||
_chunkBasePtr = _currentChunk.GetUnsafePtr();
|
||||
_currentChunkEntityCount = _currentChunk.Count;
|
||||
_currentChunkEntityCount = _currentChunk._count;
|
||||
|
||||
for (var index = 0; index < 8; index++)
|
||||
{
|
||||
@@ -1444,7 +1444,7 @@ public unsafe partial struct EntityQuery
|
||||
while (true)
|
||||
{
|
||||
_currentEntityIndex++;
|
||||
if (_currentEntityIndex < _currentChunk.Count)
|
||||
if (_currentEntityIndex < _currentChunk._count)
|
||||
{
|
||||
var pChunkData = _currentChunk.GetUnsafePtr();
|
||||
if (IsEntityValid(pChunkData, _currentEntityIndex, in _currentArchetype, in _mask))
|
||||
|
||||
Reference in New Issue
Block a user