mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
31 lines
No EOL
729 B
JavaScript
31 lines
No EOL
729 B
JavaScript
define([
|
|
"Game/Core/GameObjects/GameObject",
|
|
"Lib/Utilities/Exception"
|
|
],
|
|
|
|
function (Parent, Exception) {
|
|
|
|
function GameObject(physicsEngine) {
|
|
Parent.call(this, physicsEngine);
|
|
this.createMesh();
|
|
this.render();
|
|
}
|
|
|
|
GameObject.prototype = Object.create(Parent.prototype);
|
|
|
|
GameObject.prototype.destroy = function() {
|
|
// view ...
|
|
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;
|
|
|
|
}); |