Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 356 bytes modified
parent
544dc944b7
commit
0aba896bfd
|
@ -104,6 +104,7 @@ this.materialPowerupSlow = GameLib.EntityManager.Instance.findComponentById('
|
||||||
this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj');
|
this.scene = GameLib.EntityManager.Instance.findComponentById('pllp034hsj');
|
||||||
this.animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
|
this.animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
|
||||||
this.animationRotation = GameLib.EntityManager.Instance.findComponentById('z628kythyn');
|
this.animationRotation = GameLib.EntityManager.Instance.findComponentById('z628kythyn');
|
||||||
|
this.particleEnginePickle = GameLib.EntityManager.Instance.findComponentById('ddtkiu8aaa');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Game objects
|
* Game objects
|
||||||
|
@ -749,6 +750,16 @@ GameLib.CustomCode.prototype.initializeGrid = function() {
|
||||||
*/
|
*/
|
||||||
GameLib.CustomCode.prototype.explode = function(position) {
|
GameLib.CustomCode.prototype.explode = function(position) {
|
||||||
console.log('explode snake at position : ' + position.x + ', ' + position.y);
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue