Update: CC - Bacon - Entity Loaded (2xswm1bwq8.js) 221 bytes modified

beta.r3js.org
-=yb4f310 2018-02-14 15:44:15 +01:00
parent 9976781dcc
commit 6e7d953862
1 changed files with 29 additions and 19 deletions

View File

@ -111,9 +111,13 @@ GameLib.CustomCode.prototype.startAnimation = function (index) {
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
var bacon = this.tile_bacon_disappearing.clone();
bacon.visible = true;
bacon.updateInstance('visible');
bacon.position.x = x;
bacon.position.y = index;
bacon.position.z = 0.2;
bacon.position.z = 3;
bacon.updateInstance('position');
this.ccBeforeRender.grid[index][x].baconDisappearing = bacon;
@ -125,16 +129,22 @@ GameLib.CustomCode.prototype.startAnimation = function (index) {
var glow = this.tile_glow.clone();
glow.visible = true;
glow.updateInstance('visible');
glow.position.y = index;
glow.position.x = (GameLib.CustomCode.TETRIS_GRID_WIDTH / 2) - 0.5;
glow.position.z = 2;
glow.position.z = 4;
glow.updateInstance('position');
var flames = this.tile_flames_small.clone();
flames.visible = true;
flames.updateInstance('visible');
flames.position.y = index + 0.5;
flames.position.x = (GameLib.CustomCode.TETRIS_GRID_WIDTH / 2) - 0.5;
flames.position.z = 2;
flames.position.z = 5;
flames.updateInstance('position');
var animationObject = {
@ -592,7 +602,7 @@ GameLib.CustomCode.prototype.drawGrid = function () {
for (var y = 0; y < (GameLib.CustomCode.TETRIS_GRID_HEIGHT - GameLib.CustomCode.TETRIS_GRID_HEADSPACE); y++) {
for (var x = 0; x < GameLib.CustomCode.TETRIS_GRID_WIDTH; x++) {
points.push(x, y, 0.17);
points.push(x, y, 2);
}
}
@ -943,7 +953,7 @@ GameLib.CustomCode.prototype.spawnBlock = function () {
center.position.y = 0;
center.position.x = 0;
center.position.z = 0.4;
center.position.z = 3.5;
if (blockType === GameLib.CustomCode.TETRIS_BLOCK_I) {
@ -1395,9 +1405,9 @@ GameLib.CustomCode.prototype.createTile = function(tileName, imageName) {
)
)
this[tileName].visible = false;
this[tileName].updateInstance('visible');
this[tileName].visible = false;
this[tileName].updateInstance('visible');
/**
* Remove this tile from the 'meshes' so it is treated like a clone and doesn't get stored
*/
@ -1420,24 +1430,24 @@ GameLib.Event.Emit(
this.createTile('tile_5', 'image_5');
this.createTile('tile_6', 'image_6');
this.createTile('tile_flames_small', 'image_flames_small');
this.tile_flames_small.materials[0].transparent = true;
this.createTile('tile_flames_small', 'image_flames_small');
this.tile_flames_small.materials[0].transparent = true;
this.tile_flames_small.materials[0].updateInstance('transparent');
this.tile_flames_small.geometry.width = '11';
this.tile_flames_small.geometry.width = '11';
this.tile_flames_small.geometry.height = '11';
this.tile_flames_small.geometry.updateInstance('width');
this.createTile('tile_glow', 'image_glow');
this.createTile('tile_glow', 'image_glow');
this.tile_glow.materials[0].transparent = true;
this.tile_glow.materials[0].updateInstance('transparent');
this.tile_glow.geometry.width = '12';
this.tile_glow.geometry.height = '12';
this.tile_glow.geometry.updateInstance('width');
this.tile_glowMaterial = this.tile_glow.materials[0];
this.createTile('tile_center');
@ -1450,9 +1460,9 @@ GameLib.Event.Emit(
this.createTile('tile_bacon_disappearing');
this.tile_bacon_disappearing.materials[0].color.fromHex('#3e1d1d');
this.tile_bacon_disappearing.materials[0].updateInstance('color');
this.tile_bacon_disappearing.materials[0].color.fromHex('#3e1d1d');
this.tile_bacon_disappearing.materials[0].updateInstance('color');
this.drawGrid();
this.drawStatus();