fix: ecs change

This commit is contained in:
cha0s 2024-09-05 17:02:09 -05:00
parent 9df38d5952
commit 29df4c3dcb

View File

@ -142,6 +142,10 @@ onmessage = async (event) => {
action.stage = Stage.ACK; action.stage = Stage.ACK;
return; return;
} }
case 'EcsChange': {
ecs = new PredictionEcs({Components, Systems});
break;
}
case 'Tick': { case 'Tick': {
for (const entityId in packet.payload.ecs) { for (const entityId in packet.payload.ecs) {
if (packet.payload.ecs[entityId]) { if (packet.payload.ecs[entityId]) {