Skip to content

Commit 63d1200

Browse files
committed
updated worlds api used
1 parent ef9c31b commit 63d1200

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

source/WindowSystem.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private void CloseRemainingWindows(Span<uint> windowEntities, Span<uint> windowI
8585
for (int c = 0; c < chunks.Length; c++)
8686
{
8787
Chunk chunk = chunks[c];
88-
if (chunk.Definition.ContainsComponent(windowType))
88+
if (chunk.componentTypes.Contains(windowType))
8989
{
9090
ReadOnlySpan<uint> entities = chunk.Entities;
9191
ComponentEnumerator<IsWindow> components = chunk.GetComponents<IsWindow>(windowType);
@@ -271,7 +271,7 @@ private void CreateMissingWindows(Span<uint> windowEntities)
271271
for (int c = 0; c < chunks.Length; c++)
272272
{
273273
Chunk chunk = chunks[c];
274-
if (chunk.Definition.ContainsComponent(windowType))
274+
if (chunk.componentTypes.Contains(windowType))
275275
{
276276
ReadOnlySpan<uint> entities = chunk.Entities;
277277
ComponentEnumerator<IsWindow> components = chunk.GetComponents<IsWindow>(windowType);
@@ -302,7 +302,7 @@ private void UpdateWindowsToMatchEntities(Span<uint> windowEntities, Span<uint>
302302
for (int c = 0; c < chunks.Length; c++)
303303
{
304304
Chunk chunk = chunks[c];
305-
if (chunk.Definition.ContainsComponent(windowType))
305+
if (chunk.componentTypes.Contains(windowType))
306306
{
307307
ReadOnlySpan<uint> entities = chunk.Entities;
308308
ComponentEnumerator<IsWindow> components = chunk.GetComponents<IsWindow>(windowType);
@@ -346,8 +346,7 @@ private void UpdateDestinationSizes(Span<uint> windowEntities, Span<uint> window
346346
for (int c = 0; c < chunks.Length; c++)
347347
{
348348
Chunk chunk = chunks[c];
349-
Definition key = chunk.Definition;
350-
if (key.ContainsComponent(windowType) && key.ContainsComponent(destinationType))
349+
if (chunk.componentTypes.Contains(windowType) && chunk.componentTypes.Contains(destinationType))
351350
{
352351
ReadOnlySpan<uint> entities = chunk.Entities;
353352
ComponentEnumerator<IsDestination> destinationComponents = chunk.GetComponents<IsDestination>(destinationType);

0 commit comments

Comments
 (0)