Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 356 bytes modified

beta.r3js.org
-=yb4f310 2018-03-23 08:35:28 +01:00
parent 544dc944b7
commit 0aba896bfd
1 changed files with 11 additions and 0 deletions

View File

@ -104,6 +104,7 @@ this.materialPowerupSlow = GameLib.EntityManager.Instance.findComponentById('
this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj');
this.animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
this.animationRotation = GameLib.EntityManager.Instance.findComponentById('z628kythyn');
this.particleEnginePickle = GameLib.EntityManager.Instance.findComponentById('ddtkiu8aaa');
/**
* Game objects
@ -749,6 +750,16 @@ GameLib.CustomCode.prototype.initializeGrid = function() {
*/
GameLib.CustomCode.prototype.explode = function(position) {
console.log('explode snake at position : ' + position.x + ', ' + position.y);
this.state.exploding = true;
this.state.lives -= 1;
this.particleEnginePickle.position.x = position.x;
this.particleEnginePickle.position.y = position.y;
this.particleEnginePickle.updateInstance('position');
this.particleEnginePickle.enabled = true;
}
/**