Created
June 21, 2012 19:46
-
-
Save martinwells/2968094 to your computer and use it in GitHub Desktop.
This file contains 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
Bullet = gamecore.Pooled('Bullet', | |
{ | |
// Statics | |
// factory constructor -- a static function | |
create: function(x, y) | |
{ | |
// sweet static inheritance that comes with gamecore.class | |
var newBullet = this._super(); | |
newBullet.x = x; | |
newBullet.y = y; | |
} | |
}, | |
{ | |
// Instance | |
x: 0, | |
y: 0, | |
init: function() | |
{ | |
// no need to do anything here anymore | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment