From 23121376d90c99b5153b48ab96bafca3b22bbaa5 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Tue, 3 Apr 2018 13:27:36 +0200 Subject: [PATCH] Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 227 bytes modified --- 21g30t1e75.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/21g30t1e75.js b/21g30t1e75.js index 89a823c..3c671f8 100644 --- a/21g30t1e75.js +++ b/21g30t1e75.js @@ -1895,6 +1895,14 @@ GameLib.Event.Subscribe( this.explodeTime = 0; this.speedTimer = 0; + GameLib.Event.Emit( + GameLib.Event.GAME_DATA, + { + type : 'game_start', + state : this.state + } + ); + /** * Re-initialize our other custom code components */ @@ -1942,7 +1950,15 @@ GameLib.Event.Subscribe( this.touchStart.initialized = false; this.touchStart.entityLoaded = null; - console.log('starting game snake'); + GameLib.Event.Emit( + GameLib.Event.GAME_DATA, + { + type : 'game_over', + state : this.state + } + ); + + console.log('game over'); }.bind(this) )