chuck.js/app/Game/Client/GameObjects/GameObject.js
logsol 3cb2e39a18 Makes singleton variable name of NotificationCenter lowercase
When we require a singleton, its instance name should be named
by lowercase, since it is not a class.

Relates to #128
2016-10-10 22:11:55 +02:00

33 lines
No EOL
781 B
JavaScript
Executable file

define([
"Game/Core/GameObjects/GameObject",
"Lib/Utilities/Exception",
"Lib/Utilities/NotificationCenter"
],
function (Parent, Exception, nc) {
"use strict";
function GameObject(physicsEngine, uid) {
Parent.call(this, physicsEngine, uid);
this.createMesh();
this.render();
}
GameObject.prototype = Object.create(Parent.prototype);
GameObject.prototype.destroy = function() {
Parent.prototype.destroy.call(this);
};
GameObject.prototype.render = function() {
throw new Exception('Abstract method GameObject.render not overwritten');
}
GameObject.prototype.createMesh = function() {
throw new Exception('Abstract method GameObject.createMesh not overwritten');
};
return GameObject;
});