From 0aba896bfdc64c9dc3fd178d9a486773957aa6a6 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Fri, 23 Mar 2018 08:35:28 +0100 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 356 bytes modified --- 21g30t1e75.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; + } /**