diff --git a/2xswm1bwq8.js b/2xswm1bwq8.js index 0c43b1b..9a7866f 100644 --- a/2xswm1bwq8.js +++ b/2xswm1bwq8.js @@ -26,18 +26,19 @@ this.image_6 = GameLib.EntityManager.Instance.findComponentById('0bjbsj4sss'); */ this.scene = GameLib.EntityManager.Instance.findComponentById('i1ac678a5d'); -this.animation = GameLib.EntityManager.Instance.findComponentById('tnlwgvf12x'); -this.canvas = GameLib.EntityManager.Instance.findComponentById('85d0jk6dhx'); -this.burnLight = GameLib.EntityManager.Instance.findComponentById('yy6ef7ur7m'); -this.flamesSmall = GameLib.EntityManager.Instance.findComponentById('ij1khshoh8'); -this.meshBaconDisappearing = GameLib.EntityManager.Instance.findComponentById('4xa7c0zyzq'); -this.materialBaconDisappearing = GameLib.EntityManager.Instance.findComponentById('40byzi2uxm'); -this.camera = GameLib.EntityManager.Instance.findComponentById('pwk1bpg1iz_4'); -this.glow = GameLib.EntityManager.Instance.findComponentById('dowsg5nm59'); +this.animation = GameLib.EntityManager.Instance.findComponentById('tnlwgvf12x'); +this.canvas = GameLib.EntityManager.Instance.findComponentById('85d0jk6dhx'); +this.burnLight = GameLib.EntityManager.Instance.findComponentById('yy6ef7ur7m'); +this.flamesSmall = GameLib.EntityManager.Instance.findComponentById('ij1khshoh8'); +this.meshBaconDisappearing = GameLib.EntityManager.Instance.findComponentById('4xa7c0zyzq'); +this.materialBaconDisappearing = GameLib.EntityManager.Instance.findComponentById('40byzi2uxm'); + +this.glow = GameLib.EntityManager.Instance.findComponentById('dowsg5nm59'); this.glowMaterial = GameLib.EntityManager.Instance.findComponentById('36mg75tqnw'); this.scoreTexture = GameLib.EntityManager.Instance.findComponentById('kva68t4dm8'); this.scene = GameLib.EntityManager.Instance.findComponentById('vcdq7faimi'); this.gridMaterial = GameLib.EntityManager.Instance.findComponentById('31bhoj5kqr'); + this.animationSystems = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.SYSTEM_ANIMATION); GameLib.CustomCode.TETRIS_BLOCK_I = 0; @@ -1304,27 +1305,10 @@ if (GameLib.Utils.UndefinedOrNull(this.subscriptions)) { this.baconMaterials = []; - GameLib.Event.Subscribe( - GameLib.Event.WINDOW_RESIZE, - function (data) { - var aspect = data.width / data.height; - this.camera.offsetX = -((this.camera.maxX - this.camera.minX) / 2) + (GameLib.CustomCode.TETRIS_GRID_WIDTH / 2) - 0.5 - (0.5 * aspect); - this.camera.updateInstance('offsetX'); - }.bind(this) - ) - - GameLib.Event.Emit( - GameLib.Event.WINDOW_RESIZE, - { - width: window.innerWidth, - height: window.innerHeight - } - ); - - this.score = 0; - this.level = 1; - this.rows = 0; - this.speed = 1; + this.score = 0; + this.level = 1; + this.rows = 0; + this.speed = 1; this.drawGrid();