From fdb623325b03ba616d7903c2ff9e660be6e9e595 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 11 Jan 2018 11:01:25 +0100 Subject: [PATCH] Update: CC - Entity Loaded - Moorcow (hv7vehw7se.js) 31 bytes modified --- hv7vehw7se.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/hv7vehw7se.js b/hv7vehw7se.js index 5607e16..ca22683 100644 --- a/hv7vehw7se.js +++ b/hv7vehw7se.js @@ -10,9 +10,9 @@ this.enemies = []; /** * Min and max spawn time is in seconds */ -GameLib.D3.CustomCode.MIN_SPAWN_TIME = 1; -GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4; -GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE = 5; +GameLib.CustomCode.MIN_SPAWN_TIME = 1; +GameLib.CustomCode.MAX_SPAWN_TIME = 4; +GameLib.CustomCode.OBJECT_BUFFER_SIZE = 5; /** * Create references to all our 'in game' objects @@ -54,10 +54,10 @@ this.materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('g this.burningTreeParticleEngine = GameLib.EntityManager.Instance.findComponentById('jdn84unl9b'); GameLib.Event.Emit( - GameLib.Event.GET_GRAPHICS_IMPLEMENTATION, + GameLib.Event.GET_RUNTIME, null, - function(graphics) { - this.graphics = graphics + function(runtime) { + this.graphics = runtime.graphics }.bind(this) ); @@ -70,6 +70,7 @@ this.mouseDown = GameLib.EntityManager.Instance.findComponentById('jtmr6gmp5p') this.mouseMove = GameLib.EntityManager.Instance.findComponentById('lxigrx11oc'); this.touchMove = GameLib.EntityManager.Instance.findComponentById('evwkow5289'); +/* GameLib.Event.Subscribe( GameLib.Event.WINDOW_RESIZE, function(data) { @@ -82,7 +83,7 @@ GameLib.Event.Subscribe( ); }.bind(this) ); - +*/ /** * Tell all our custom code components that we loaded */ @@ -164,27 +165,27 @@ this.createMesh = function(meshType) { ); }; -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('bull'); } -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('star'); } -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('burger'); } -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('parcel'); } -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('santa'); } -for (var n = 0; n < GameLib.D3.CustomCode.OBJECT_BUFFER_SIZE; n++) { +for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { this.createMesh('kanister'); }