diff --git a/2xswm1bwq8.js b/2xswm1bwq8.js index 85a093e..e9e8820 100644 --- a/2xswm1bwq8.js +++ b/2xswm1bwq8.js @@ -34,7 +34,6 @@ this.gridMaterial = GameLib.EntityManager.Instance.findComponentById('xpkbcvson9 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'); @@ -49,22 +48,31 @@ this.scoreTexture = GameLib.EntityManager.Instance.findComponentById('kva68t4dm8 this.animationSystems = GameLib.EntityManager.Instance.queryComponents(GameLib.Component.SYSTEM_ANIMATION); -GameLib.CustomCode.TETRIS_BLOCK_I = 0; -GameLib.CustomCode.TETRIS_BLOCK_L = 1; -GameLib.CustomCode.TETRIS_BLOCK_L2 = 2; -GameLib.CustomCode.TETRIS_BLOCK_Z = 3; -GameLib.CustomCode.TETRIS_BLOCK_Z2 = 4; -GameLib.CustomCode.TETRIS_BLOCK_T = 5; -GameLib.CustomCode.TETRIS_BLOCK_O = 6; -GameLib.CustomCode.TETRIS_BLOCK_MAX = 7; +/** + * Initial Game Settings + * @type {number} + */ +this.score = 0; +this.level = 1; +this.rows = 0; +this.speed = 1; -GameLib.CustomCode.TETRIS_GRID_WIDTH = 11; -GameLib.CustomCode.TETRIS_GRID_HEIGHT = 24; -GameLib.CustomCode.TETRIS_GRID_HEADSPACE = 4; +GameLib.CustomCode.TETRIS_BLOCK_I = 0; +GameLib.CustomCode.TETRIS_BLOCK_L = 1; +GameLib.CustomCode.TETRIS_BLOCK_L2 = 2; +GameLib.CustomCode.TETRIS_BLOCK_Z = 3; +GameLib.CustomCode.TETRIS_BLOCK_Z2 = 4; +GameLib.CustomCode.TETRIS_BLOCK_T = 5; +GameLib.CustomCode.TETRIS_BLOCK_O = 6; +GameLib.CustomCode.TETRIS_BLOCK_MAX = 7; -GameLib.CustomCode.TETRIS_GRID_NOT_TAKEN = 0; -GameLib.CustomCode.TETRIS_GRID_TAKEN = 1; -GameLib.CustomCode.TETRIS_GRID_DISAPPEARING = 2; +GameLib.CustomCode.TETRIS_GRID_WIDTH = 11; +GameLib.CustomCode.TETRIS_GRID_HEIGHT = 24; +GameLib.CustomCode.TETRIS_GRID_HEADSPACE = 4; + +GameLib.CustomCode.TETRIS_GRID_NOT_TAKEN = 0; +GameLib.CustomCode.TETRIS_GRID_TAKEN = 1; +GameLib.CustomCode.TETRIS_GRID_DISAPPEARING = 2; GameLib.CustomCode.prototype.visualizeGrid = function (color) { @@ -576,9 +584,6 @@ GameLib.CustomCode.prototype.startAnimations = function () { GameLib.CustomCode.prototype.drawGrid = function () { - this.gridMaterial.color.fromHex('#a79f99'); - this.gridMaterial.color.updateInstance('color'); - var geometry = new THREE.BufferGeometry(); var points = []; @@ -1412,6 +1417,7 @@ GameLib.Event.Emit( this.createTile('tile_center') this.drawGrid(); + this.drawStatus(); GameLib.Event.Emit(GameLib.Event.GAME_LOADED);