diff --git a/21g30t1e75.js b/21g30t1e75.js index 31573f3..20798c7 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -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; + } /**