diff --git a/2xswm1bwq8.js b/2xswm1bwq8.js index e9e8820..a9c4f46 100644 --- a/2xswm1bwq8.js +++ b/2xswm1bwq8.js @@ -13,13 +13,14 @@ this.ccTouchEnd = GameLib.EntityManager.Instance.findComponentById('ohqwmnjf /** * Images */ -this.image_0 = GameLib.EntityManager.Instance.findComponentById('gvrik6h4yd'); -this.image_1 = GameLib.EntityManager.Instance.findComponentById('ssdlmrpv9j'); -this.image_2 = GameLib.EntityManager.Instance.findComponentById('zdg2qpu35c'); -this.image_3 = GameLib.EntityManager.Instance.findComponentById('pjy42fg69n'); -this.image_4 = GameLib.EntityManager.Instance.findComponentById('5t3olr10pw'); -this.image_5 = GameLib.EntityManager.Instance.findComponentById('qrh0foyins'); -this.image_6 = GameLib.EntityManager.Instance.findComponentById('0bjbsj4sss'); +this.image_0 = GameLib.EntityManager.Instance.findComponentById('gvrik6h4yd'); +this.image_1 = GameLib.EntityManager.Instance.findComponentById('ssdlmrpv9j'); +this.image_2 = GameLib.EntityManager.Instance.findComponentById('zdg2qpu35c'); +this.image_3 = GameLib.EntityManager.Instance.findComponentById('pjy42fg69n'); +this.image_4 = GameLib.EntityManager.Instance.findComponentById('5t3olr10pw'); +this.image_5 = GameLib.EntityManager.Instance.findComponentById('qrh0foyins'); +this.image_6 = GameLib.EntityManager.Instance.findComponentById('0bjbsj4sss'); +this.image_flames_small = GameLib.EntityManager.Instance.findComponentById('vp4zkbx7yr'); /** * Scene @@ -31,22 +32,27 @@ this.scene = GameLib.EntityManager.Instance.findComponentById('i1ac678a5d'); */ this.gridMaterial = GameLib.EntityManager.Instance.findComponentById('xpkbcvson9'); +/** + * Score Canvas + */ +this.canvas = GameLib.EntityManager.Instance.findComponentById('85d0jk6dhx'); -this.materialBaconDisappearing = GameLib.EntityManager.Instance.findComponentById('40byzi2uxm'); - -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'); +/** + * Animations + */ +this.animation = GameLib.EntityManager.Instance.findComponentById('tnlwgvf12x'); +this.animationSystems = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.SYSTEM_ANIMATION); +/** + * Lights + */ +this.burnLight = GameLib.EntityManager.Instance.findComponentById('q13y5xwv6c'); this.glow = GameLib.EntityManager.Instance.findComponentById('dowsg5nm59'); this.glowMaterial = GameLib.EntityManager.Instance.findComponentById('36mg75tqnw'); this.scoreTexture = GameLib.EntityManager.Instance.findComponentById('kva68t4dm8'); -this.animationSystems = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.SYSTEM_ANIMATION); /** * Initial Game Settings @@ -108,7 +114,7 @@ GameLib.CustomCode.prototype.startAnimation = function (index) { for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) { - var bacon = this.meshBaconDisappearing.clone(); + var bacon = this.tile_bacon_disappearing.clone(); bacon.position.x = x; bacon.position.y = index; bacon.position.z = 0.2; @@ -128,7 +134,7 @@ GameLib.CustomCode.prototype.startAnimation = function (index) { glow.position.z = 2; glow.updateInstance('position'); - var flames = this.flamesSmall.clone(); + var flames = this.tile_flames_small.clone(); flames.position.y = index + 0.5; flames.position.x = (GameLib.CustomCode.TETRIS_GRID_WIDTH / 2) - 0.5; @@ -449,7 +455,7 @@ GameLib.CustomCode.prototype.drawStatus = function () { context.lineWidth = 8; - context.strokeStyle = '#612d1a'; + context.strokeStyle = '#eeb999'; context.strokeRect(12, 30, 485, 178); context.beginPath(); @@ -475,7 +481,7 @@ GameLib.CustomCode.prototype.drawStatus = function () { /** * Write text */ - context.fillStyle = '#7e3b26'; + context.fillStyle = '#eeb999'; context.font = '20pt BkBold'; context.fillText('NEXT TILES', 23, 52); @@ -485,7 +491,7 @@ GameLib.CustomCode.prototype.drawStatus = function () { context.fillText('ROWS', 182, 193); - context.fillStyle = '#e0b899'; + context.fillStyle = '#eeb999'; context.font = '50pt BkBold'; @@ -1407,14 +1413,18 @@ GameLib.Event.Emit( this.graphics = runtime.graphics; - this.createTile('tile_0', 'image_0'); - this.createTile('tile_1', 'image_1'); - this.createTile('tile_2', 'image_2'); - this.createTile('tile_3', 'image_3'); - this.createTile('tile_4', 'image_4'); - this.createTile('tile_5', 'image_5'); - this.createTile('tile_6', 'image_6'); - this.createTile('tile_center') + this.createTile('tile_0', 'image_0'); + this.createTile('tile_1', 'image_1'); + this.createTile('tile_2', 'image_2'); + this.createTile('tile_3', 'image_3'); + this.createTile('tile_4', 'image_4'); + this.createTile('tile_5', 'image_5'); + this.createTile('tile_6', 'image_6'); + this.createTile('tile_flames_small', 'image_flames_small'); + + this.createTile('tile_center'); + this.createTile('tile_bacon_disappearing'); + this.drawGrid(); this.drawStatus();