Skip to content

Instantly share code, notes, and snippets.

@th1agoalmeida
Last active December 12, 2015 10:08
Show Gist options
  • Save th1agoalmeida/4756475 to your computer and use it in GitHub Desktop.
Save th1agoalmeida/4756475 to your computer and use it in GitHub Desktop.
so, I still only get "init" in the logs :( ig.game.spawnEntity(FeatureButton, {});
FeatureButton = ig.Entity.extend({
init: function(settings) {
this.parent(settings);
console.log('button init');
},
update: function() {
this.parent();
console.log('button update');
},
draw: function() {
this.parent();
console.log('button draw');
}
});
init: function() {
//this.loadLevel(LevelA);
//this.loadLevelDeferred(ig.global['LevelA']);
ig.game.loadLevelDeferred(ig.global['LevelA']);
//this.btn = new FeatureButton({with: 100, height: 50, right: 99, bottom: 0});
// ig.game.spawnEntity(EntityHero);
//ig.game.spawnEntity(FeatureButton, 100, 50, {right: 99, bottom: 0});
ig.game.spawnEntity(FeatureButton, {});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment