Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 4063 bytes modified

beta.r3js.org
-=yb4f310 2018-03-22 12:31:24 +01:00
parent 02e5d40445
commit 1f0b599d61
1 changed files with 983 additions and 960 deletions

View File

@ -1,140 +1,140 @@
if (this.parentEntity === data.entity) { if (this.parentEntity === data.entity) {
console.log('snake entity loaded'); console.log('snake entity loaded');
} else { } else {
return; return;
} }
/** /**
* Defines * Defines
*/ */
GameLib.CustomCode.BODY_TYPE_NORMAL = 0x1; GameLib.CustomCode.BODY_TYPE_NORMAL = 0x1;
GameLib.CustomCode.BODY_TYPE_TAIL = 0x2; GameLib.CustomCode.BODY_TYPE_TAIL = 0x2;
GameLib.CustomCode.BODY_TYPE_CORNER = 0x3; GameLib.CustomCode.BODY_TYPE_CORNER = 0x3;
GameLib.CustomCode.GRID_WIDTH = 11; GameLib.CustomCode.GRID_WIDTH = 11;
GameLib.CustomCode.GRID_HEIGHT = 10; GameLib.CustomCode.GRID_HEIGHT = 10;
GameLib.CustomCode.GRID_OFFSET_X = 1; GameLib.CustomCode.GRID_OFFSET_X = 1;
GameLib.CustomCode.GRID_OFFSET_Y = 8; GameLib.CustomCode.GRID_OFFSET_Y = 8;
GameLib.CustomCode.SPEED_INITIAL = 1; GameLib.CustomCode.SPEED_INITIAL = 1;
GameLib.CustomCode.ORIENTATION_UP = 0; GameLib.CustomCode.ORIENTATION_UP = 0;
GameLib.CustomCode.ORIENTATION_LEFT = 1; GameLib.CustomCode.ORIENTATION_LEFT = 1;
GameLib.CustomCode.ORIENTATION_DOWN = 2; GameLib.CustomCode.ORIENTATION_DOWN = 2;
GameLib.CustomCode.ORIENTATION_RIGHT = 3; GameLib.CustomCode.ORIENTATION_RIGHT = 3;
GameLib.CustomCode.FOOD_SPEED_INITIAL = 3; GameLib.CustomCode.FOOD_SPEED_INITIAL = 3;
GameLib.CustomCode.MAX_FOOD_ITEMS = 6; GameLib.CustomCode.MAX_FOOD_ITEMS = 6;
GameLib.CustomCode.POWERUP_WAIT_TIME_MIN = 5; GameLib.CustomCode.POWERUP_WAIT_TIME_MIN = 5;
GameLib.CustomCode.POWERUP_WAIT_TIME_MAX = 10; GameLib.CustomCode.POWERUP_WAIT_TIME_MAX = 10;
GameLib.CustomCode.POWERUP_DURATION = 7; GameLib.CustomCode.POWERUP_DURATION = 7;
GameLib.CustomCode.POWERUP_SPEED = 0; GameLib.CustomCode.POWERUP_SPEED = 0;
GameLib.CustomCode.POWERUP_LIFE = 1; GameLib.CustomCode.POWERUP_LIFE = 1;
GameLib.CustomCode.POWERUP_SLOW = 2; GameLib.CustomCode.POWERUP_SLOW = 2;
GameLib.CustomCode.MAX_POWERUP_ITEMS = 3; GameLib.CustomCode.MAX_POWERUP_ITEMS = 3;
GameLib.CustomCode.FOOD_BACON = 0; GameLib.CustomCode.FOOD_BACON = 0;
GameLib.CustomCode.FOOD_CHEESE = 1; GameLib.CustomCode.FOOD_CHEESE = 1;
GameLib.CustomCode.FOOD_ONION = 2; GameLib.CustomCode.FOOD_ONION = 2;
GameLib.CustomCode.FOOD_ONION_RING = 3; GameLib.CustomCode.FOOD_ONION_RING = 3;
GameLib.CustomCode.FOOD_PATTY = 4; GameLib.CustomCode.FOOD_PATTY = 4;
GameLib.CustomCode.FOOD_TOMATO = 5; GameLib.CustomCode.FOOD_TOMATO = 5;
GameLib.CustomCode.BODY_TYPE_BREAD_BACON = 0; GameLib.CustomCode.BODY_TYPE_BREAD_BACON = 0;
GameLib.CustomCode.BODY_TYPE_BREAD_CHEESE = 1; GameLib.CustomCode.BODY_TYPE_BREAD_CHEESE = 1;
GameLib.CustomCode.BODY_TYPE_BREAD_ONION = 2; GameLib.CustomCode.BODY_TYPE_BREAD_ONION = 2;
GameLib.CustomCode.BODY_TYPE_BREAD_ONION_RING = 3; GameLib.CustomCode.BODY_TYPE_BREAD_ONION_RING = 3;
GameLib.CustomCode.BODY_TYPE_BREAD_PATTY = 4; GameLib.CustomCode.BODY_TYPE_BREAD_PATTY = 4;
GameLib.CustomCode.BODY_TYPE_BREAD_HEAD = 5; GameLib.CustomCode.BODY_TYPE_BREAD_HEAD = 5;
GameLib.CustomCode.BODY_TYPE_BREAD_TAIL = 6; GameLib.CustomCode.BODY_TYPE_BREAD_TAIL = 6;
GameLib.CustomCode.BODY_TYPE_BREAD_CORNER = 7; GameLib.CustomCode.BODY_TYPE_BREAD_CORNER = 7;
GameLib.CustomCode.OBJECT_TYPE_NONE = 0; GameLib.CustomCode.OBJECT_TYPE_NONE = 0;
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY = 1; GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY = 1;
GameLib.CustomCode.OBJECT_TYPE_FOOD = 2; GameLib.CustomCode.OBJECT_TYPE_FOOD = 2;
GameLib.CustomCode.OBJECT_TYPE_POWERUP = 3; GameLib.CustomCode.OBJECT_TYPE_POWERUP = 3;
/** /**
* Get runtime * Get runtime
*/ */
this.runtime = GameLib.Utils.GetRuntime(); this.runtime = GameLib.Utils.GetRuntime();
/** /**
* Custom Code Components * Custom Code Components
*/ */
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt'); this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt');
this.keyUp = GameLib.EntityManager.Instance.findComponentById('306204wy29'); this.keyUp = GameLib.EntityManager.Instance.findComponentById('306204wy29');
/** /**
* Geometries * Geometries
*/ */
this.geometryBody = GameLib.EntityManager.Instance.findComponentById('8f5q7k5ozp'); this.geometryBody = GameLib.EntityManager.Instance.findComponentById('8f5q7k5ozp');
GameLib.CustomCode.BODY_SCALE_X = this.geometryBody.width; GameLib.CustomCode.BODY_SCALE_X = this.geometryBody.width;
GameLib.CustomCode.BODY_SCALE_Y = this.geometryBody.height; GameLib.CustomCode.BODY_SCALE_Y = this.geometryBody.height;
/** /**
* Materials * Materials
*/ */
this.materialTomato = GameLib.EntityManager.Instance.findComponentById('merwtvkm1t'); this.materialTomato = GameLib.EntityManager.Instance.findComponentById('merwtvkm1t');
this.materialBacon = GameLib.EntityManager.Instance.findComponentById('x5ffcl6ojc'); this.materialBacon = GameLib.EntityManager.Instance.findComponentById('x5ffcl6ojc');
this.materialCheese = GameLib.EntityManager.Instance.findComponentById('0rxqy5eddx'); this.materialCheese = GameLib.EntityManager.Instance.findComponentById('0rxqy5eddx');
this.materialOnionRing = GameLib.EntityManager.Instance.findComponentById('gz8zex5xug'); this.materialOnionRing = GameLib.EntityManager.Instance.findComponentById('gz8zex5xug');
this.materialPatty = GameLib.EntityManager.Instance.findComponentById('f7y8nurbcv'); this.materialPatty = GameLib.EntityManager.Instance.findComponentById('f7y8nurbcv');
this.materialOnion = GameLib.EntityManager.Instance.findComponentById('im3tsuzwrp'); this.materialOnion = GameLib.EntityManager.Instance.findComponentById('im3tsuzwrp');
this.materialBreadBacon = GameLib.EntityManager.Instance.findComponentById('wn31yqi6lc'); this.materialBreadBacon = GameLib.EntityManager.Instance.findComponentById('wn31yqi6lc');
this.materialBreadCheese = GameLib.EntityManager.Instance.findComponentById('i22ixqizge'); this.materialBreadCheese = GameLib.EntityManager.Instance.findComponentById('i22ixqizge');
this.materialBreadOnion = GameLib.EntityManager.Instance.findComponentById('69sybcj08d'); this.materialBreadOnion = GameLib.EntityManager.Instance.findComponentById('69sybcj08d');
this.materialBreadOnionRing = GameLib.EntityManager.Instance.findComponentById('kvesyjtr2v'); this.materialBreadOnionRing = GameLib.EntityManager.Instance.findComponentById('kvesyjtr2v');
this.materialBreadPatty = GameLib.EntityManager.Instance.findComponentById('k6axym9bu5'); this.materialBreadPatty = GameLib.EntityManager.Instance.findComponentById('k6axym9bu5');
this.materialBreadHead = GameLib.EntityManager.Instance.findComponentById('heu4f7zzuh'); this.materialBreadHead = GameLib.EntityManager.Instance.findComponentById('heu4f7zzuh');
this.materialBreadTail = GameLib.EntityManager.Instance.findComponentById('mm2yq9rmpf'); this.materialBreadTail = GameLib.EntityManager.Instance.findComponentById('mm2yq9rmpf');
this.materialBreadCorner = GameLib.EntityManager.Instance.findComponentById('ju9r1bw6cb'); this.materialBreadCorner = GameLib.EntityManager.Instance.findComponentById('ju9r1bw6cb');
this.materialPowerupSpeed = GameLib.EntityManager.Instance.findComponentById('fb32uutj9q'); this.materialPowerupSpeed = GameLib.EntityManager.Instance.findComponentById('fb32uutj9q');
this.materialPowerupLife = GameLib.EntityManager.Instance.findComponentById('6tld70a6zu'); this.materialPowerupLife = GameLib.EntityManager.Instance.findComponentById('6tld70a6zu');
this.materialPowerupSlow = GameLib.EntityManager.Instance.findComponentById('ulgntj8nta'); this.materialPowerupSlow = GameLib.EntityManager.Instance.findComponentById('ulgntj8nta');
/** /**
* Other Objects (Scene) * Other Objects (Scene)
*/ */
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');
/** /**
* Game objects * Game objects
*/ */
this.snake = []; this.snake = [];
this.grid = [[]]; this.grid = [[]];
this.speed = GameLib.CustomCode.SPEED_INITIAL; this.speed = GameLib.CustomCode.SPEED_INITIAL;
this.advanceTime = 0; this.advanceTime = 0;
this.foodTime = 0; this.foodTime = 0;
this.foodSpeed = GameLib.CustomCode.FOOD_SPEED_INITIAL; this.foodSpeed = GameLib.CustomCode.FOOD_SPEED_INITIAL;
this.food = []; this.food = [];
this.powerupTime = 0; this.powerupTime = 0;
this.nextPowerupTime = GameLib.Utils.GetRandomIntInclusive( this.nextPowerupTime = GameLib.Utils.GetRandomIntInclusive(
GameLib.CustomCode.POWERUP_WAIT_TIME_MIN, GameLib.CustomCode.POWERUP_WAIT_TIME_MIN,
GameLib.CustomCode.POWERUP_WAIT_TIME_MAX GameLib.CustomCode.POWERUP_WAIT_TIME_MAX
); );
this.powerups = []; this.powerups = [];
/** /**
* Orientation is 0, 1, 2 or 3, (up, left, down, right) - * Orientation is 0, 1, 2 or 3, (up, left, down, right) -
* This is also the amount we need to multiply with PI to get the mesh rotation * This is also the amount we need to multiply with PI to get the mesh rotation
* @type {{direction: {x: number, y: number}, orientation: number}} * @type {{direction: {x: number, y: number}, orientation: number}}
*/ */
this.state = { this.state = {
orientation : 0, orientation : 0,
turning : false, turning : false,
flip : 0 flip : 0
}; };
GameLib.CustomCode.prototype.visualizeGrid = function () { GameLib.CustomCode.prototype.visualizeGrid = function () {
if (this.noneMesh) { if (this.noneMesh) {
this.scene.instance.remove(this.noneMesh); this.scene.instance.remove(this.noneMesh);
@ -222,9 +222,9 @@ GameLib.CustomCode.prototype.visualizeGrid = function () {
this.scene.instance.add(this.powerupMesh); this.scene.instance.add(this.powerupMesh);
this.scene.instance.add(this.snakeMesh); this.scene.instance.add(this.snakeMesh);
}.bind(this) }.bind(this)
GameLib.CustomCode.prototype.createGameMesh = function(material, visible) { GameLib.CustomCode.prototype.createGameMesh = function(material, visible) {
if (GameLib.Utils.UndefinedOrNull(visible)) { if (GameLib.Utils.UndefinedOrNull(visible)) {
visible = true; visible = true;
@ -244,9 +244,9 @@ GameLib.CustomCode.prototype.createGameMesh = function(material, visible) {
return mesh; return mesh;
}.bind(this) }.bind(this)
/** /**
* GameLib.CustomCode.Object * GameLib.CustomCode.Object
* @param objectType * @param objectType
* @param type * @param type
@ -254,12 +254,12 @@ GameLib.CustomCode.prototype.createGameMesh = function(material, visible) {
* @param position * @param position
* @constructor * @constructor
*/ */
GameLib.CustomCode.GameObject = function( GameLib.CustomCode.GameObject = function(
objectType, objectType,
type, type,
mesh, mesh,
position position
) { ) {
if (GameLib.Utils.UndefinedOrNull(objectType)) { if (GameLib.Utils.UndefinedOrNull(objectType)) {
objectType = GameLib.CustomCode.OBJECT_TYPE_NONE; objectType = GameLib.CustomCode.OBJECT_TYPE_NONE;
} }
@ -279,12 +279,12 @@ GameLib.CustomCode.GameObject = function(
position = null; position = null;
} }
this.position = position; this.position = position;
} }
/** /**
* Disposes of the mesh object and resets this object to its defaults * Disposes of the mesh object and resets this object to its defaults
*/ */
GameLib.CustomCode.GameObject.prototype.dispose = function(removeMesh) { GameLib.CustomCode.GameObject.prototype.dispose = function(removeMesh) {
if (GameLib.Utils.UndefinedOrNull(removeMesh)) { if (GameLib.Utils.UndefinedOrNull(removeMesh)) {
removeMesh = true; removeMesh = true;
@ -302,13 +302,13 @@ GameLib.CustomCode.GameObject.prototype.dispose = function(removeMesh) {
this.type = -1; this.type = -1;
this.position = null; this.position = null;
}; };
/** /**
* Applies the object position to the mesh taking into account the offset and scale of the body * Applies the object position to the mesh taking into account the offset and scale of the body
* @param updateInstance * @param updateInstance
*/ */
GameLib.CustomCode.GameObject.prototype.applyToMesh = function(updateInstance) { GameLib.CustomCode.GameObject.prototype.applyToMesh = function(updateInstance) {
if (this.mesh) { if (this.mesh) {
this.mesh.position.x = (this.position.x * GameLib.CustomCode.BODY_SCALE_X) + GameLib.CustomCode.GRID_OFFSET_X; this.mesh.position.x = (this.position.x * GameLib.CustomCode.BODY_SCALE_X) + GameLib.CustomCode.GRID_OFFSET_X;
@ -319,13 +319,13 @@ GameLib.CustomCode.GameObject.prototype.applyToMesh = function(updateInstance) {
this.mesh.updateInstance('position'); this.mesh.updateInstance('position');
} }
} }
}; };
/** /**
* Scans through the grid, gets all empty positions, and chooses a random one * Scans through the grid, gets all empty positions, and chooses a random one
* @type {function(this:snakeEntityLoaded)} * @type {function(this:snakeEntityLoaded)}
*/ */
GameLib.CustomCode.prototype.getFreeGridPosition = function() { GameLib.CustomCode.prototype.getFreeGridPosition = function() {
var x = GameLib.Utils.GetRandomInt(0, GameLib.CustomCode.GRID_WIDTH); var x = GameLib.Utils.GetRandomInt(0, GameLib.CustomCode.GRID_WIDTH);
var y = GameLib.Utils.GetRandomInt(0, GameLib.CustomCode.GRID_HEIGHT); var y = GameLib.Utils.GetRandomInt(0, GameLib.CustomCode.GRID_HEIGHT);
@ -335,18 +335,18 @@ GameLib.CustomCode.prototype.getFreeGridPosition = function() {
y : y y : y
}; };
}.bind(this); }.bind(this);
/** /**
* *
* @type {function(this:snakeEntityLoaded)} * @type {function(this:snakeEntityLoaded)}
*/ */
GameLib.CustomCode.prototype.createGameObject = function( GameLib.CustomCode.prototype.createGameObject = function(
objectType, objectType,
type, type,
position, position,
orientation orientation
) { ) {
if (GameLib.Utils.UndefinedOrNull(type)) { if (GameLib.Utils.UndefinedOrNull(type)) {
type = null; type = null;
@ -544,9 +544,9 @@ GameLib.CustomCode.prototype.createGameObject = function(
return gameObject; return gameObject;
}.bind(this); }.bind(this);
GameLib.CustomCode.prototype.createPowerup = function(delta) { GameLib.CustomCode.prototype.createPowerup = function(delta) {
this.powerupTime += delta; this.powerupTime += delta;
@ -562,9 +562,9 @@ GameLib.CustomCode.prototype.createPowerup = function(delta) {
this.getFreeGridPosition() this.getFreeGridPosition()
); );
}.bind(this); }.bind(this);
GameLib.CustomCode.prototype.createFood = function(delta) { GameLib.CustomCode.prototype.createFood = function(delta) {
this.foodTime += delta; this.foodTime += delta;
@ -580,10 +580,10 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
this.getFreeGridPosition() this.getFreeGridPosition()
); );
}.bind(this); }.bind(this);
/** /**
* GameLib.CustomCode.SnakeBody * GameLib.CustomCode.SnakeBody
* @param type * @param type
* @param mesh * @param mesh
@ -595,7 +595,7 @@ GameLib.CustomCode.prototype.createFood = function(delta) {
* @property animation * @property animation
* @constructor * @constructor
*/ */
GameLib.CustomCode.SnakeBody = function( GameLib.CustomCode.SnakeBody = function(
type, type,
mesh, mesh,
position, position,
@ -603,7 +603,7 @@ GameLib.CustomCode.SnakeBody = function(
flip, flip,
backupMesh, backupMesh,
isTail isTail
) { ) {
GameLib.CustomCode.GameObject.call( GameLib.CustomCode.GameObject.call(
this, this,
@ -638,12 +638,12 @@ GameLib.CustomCode.SnakeBody = function(
var animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn'); var animation = GameLib.EntityManager.Instance.findComponentById('8kb7utb2fn');
animation.meshes.push(this.mesh); animation.meshes.push(this.mesh);
}; };
GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype); GameLib.CustomCode.SnakeBody.prototype = Object.create(GameLib.CustomCode.GameObject.prototype);
GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject; GameLib.CustomCode.SnakeBody.prototype.constructor = GameLib.CustomCode.GameObject;
GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) { GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) {
GameLib.CustomCode.GameObject.prototype.applyToMesh.call(this, updateInstance); GameLib.CustomCode.GameObject.prototype.applyToMesh.call(this, updateInstance);
@ -656,9 +656,9 @@ GameLib.CustomCode.SnakeBody.prototype.applyToMesh = function(updateInstance) {
} }
this.mesh.updateInstance('rotation'); this.mesh.updateInstance('rotation');
} }
GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) { GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {
var crash = false; var crash = false;
@ -705,9 +705,9 @@ GameLib.CustomCode.SnakeBody.prototype.advance = function(orientation, flip) {
this.flip = flip; this.flip = flip;
return !crash; return !crash;
} }
GameLib.CustomCode.prototype.initializeGrid = function() { GameLib.CustomCode.prototype.initializeGrid = function() {
this.grid = []; this.grid = [];
@ -718,7 +718,7 @@ GameLib.CustomCode.prototype.initializeGrid = function() {
} }
} }
}.bind(this); }.bind(this);
// GameLib.CustomCode.prototype.rebuildGrid = function() { // GameLib.CustomCode.prototype.rebuildGrid = function() {
// //
@ -766,35 +766,58 @@ GameLib.CustomCode.prototype.initializeGrid = function() {
// }.bind(this); // }.bind(this);
/** /**
* Explode the snake * Explode the snake
* @param position * @param position
*/ */
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);
} }
/** /**
* Extend the snake with information from gameObject * Extend the snake with information from gameObject
* @param gameObject * @param gameObject
*/ */
GameLib.CustomCode.prototype.extend = function(gameObject) { GameLib.CustomCode.prototype.extend = function(gameObject, position, orientation) {
console.log('extend');
};
/** if (gameObject.objectType !== GameLib.CustomCode.OBJECT_TYPE_FOOD) {
throw new Error('wrong type of game object');
}
var body = null;
switch (gameObject.type) {
case GameLib.CustomCode.FOOD_BACON :
body = this.createGameObject(
GameLib.CustomCode.OBJECT_TYPE_SNAKE_BODY,
GameLib.CustomCode.BODY_TYPE_BREAD_BACON,
position,
orientation
)
break;
default :
throw new Error('unhandled food type: ' + gameObject.type);
}
this.state.eating = true;
this.snake.splice(1, 0, body);
}.bind(this);
/**
* Powerup the snake with information from gameObject * Powerup the snake with information from gameObject
* @param gameObject * @param gameObject
*/ */
GameLib.CustomCode.prototype.powerup = function(gameObject) { GameLib.CustomCode.prototype.powerup = function(gameObject) {
console.log('powerup'); console.log('powerup');
}; };
/** /**
* Move the snake forward and do collision detection * Move the snake forward and do collision detection
* @type {function(this:snakeEntityLoaded)} * @type {function(this:snakeEntityLoaded)}
*/ */
GameLib.CustomCode.prototype.advanceSnake = function(delta) { GameLib.CustomCode.prototype.advanceSnake = function(delta) {
this.advanceTime += delta; this.advanceTime += delta;
@ -997,9 +1020,9 @@ GameLib.CustomCode.prototype.advanceSnake = function(delta) {
this.visualizeGrid(); this.visualizeGrid();
}.bind(this); }.bind(this);
GameLib.Event.Subscribe( GameLib.Event.Subscribe(
GameLib.Event.GAME_START, GameLib.Event.GAME_START,
function() { function() {
@ -1080,9 +1103,9 @@ GameLib.Event.Subscribe(
console.log('starting game snake'); console.log('starting game snake');
}.bind(this) }.bind(this)
); );
GameLib.Event.Subscribe( GameLib.Event.Subscribe(
GameLib.Event.GAME_OVER, GameLib.Event.GAME_OVER,
function() { function() {
@ -1094,8 +1117,8 @@ GameLib.Event.Subscribe(
console.log('starting game snake'); console.log('starting game snake');
}.bind(this) }.bind(this)
) )
GameLib.Event.Emit(GameLib.Event.GAME_LOADED); GameLib.Event.Emit(GameLib.Event.GAME_LOADED);
//@ sourceURL=entityLoaded.js //@ sourceURL=entityLoaded.js