cubeforge 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -707,7 +707,9 @@ var ScriptSystem = class {
707
707
  update(world, dt) {
708
708
  const entities = world.query("Script");
709
709
  for (const id of entities) {
710
+ if (!world.hasEntity(id)) continue;
710
711
  const script = world.getComponent(id, "Script");
712
+ if (!script?.update) continue;
711
713
  try {
712
714
  script.update(id, world, this.input, dt);
713
715
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cubeforge",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "React-first 2D browser game engine",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {