-
-
Save benjamingr/5427228 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* What Im trying to get to work | |
* | |
*/ | |
function playersGameName(options){ | |
// stuff in here to init whatevs. | |
} | |
playersGameName.prototype = new Jest(options); | |
Jest= function(options){ | |
// initialize stuff | |
} | |
Jest.prototype = { | |
addItemToRenderer : function(args){ | |
} | |
} | |
Jest.Sprite = function(){ | |
//properties and stuff | |
// this doesnt work, | |
Jest.addItemToRenderer(this); | |
} | |
/* | |
* | |
* This is how I do it currently and I hate it | |
* | |
*/ | |
var Game = {} | |
function playersGameName(options){ | |
// stuff in here to init whatevs. | |
} | |
playersGameName.prototype = new Jest(options); | |
// seems redundant | |
Game = new playersGame(); | |
// Game framework | |
Jest= function(options){ | |
// initialize stuff | |
} | |
Jest.prototype = { | |
addItemToRenderer : function(args){ | |
} | |
} | |
// make a new sprite | |
Jest.Sprite = function(){ | |
//properties and stuff | |
// Referencing the game variable... which just seems dumb | |
Game.addItemToRenderer(this); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment