1 decade ago by manuelac
Trying to create a single Mage Entity, Weltmeister doesnt load and throws
Uncaught Unresolved (circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules:
weltmeister.weltmeister (requires: weltmeister.edit-entities)
weltmeister.edit-entities (requires: weltmeister.entities)
weltmeister.entities (requires: game.entities.mage)
Any idea what am I doing wrong? I am following the puck video! Thanks!
.requires {
'impact.entity'
}
ig.module {
'game.entities.mage'
}
.defines(function(){
EntityMage = ig.Entity.extend({
size: {x:48, y:48},
collides: ig.Entity.COLLIDES.FIXED,
animSheet: new ig.AnimationSheet( 'media/mage-1.png', 48, 48),
init: function(x, y, settings){
this.parent(x, y, settings);
this.addAnim( 'idle', 1, [0]);
this.vel.x = 0;
this.vel.y = 0;
},
update: function(){
if (ig.input.state('up')) {
this.vel.y = -100;
} else if (ig.input.state('down')) {
this.vel.y = 100;
} else {
this.vel.y = 0;
}
this.parent();
}
})
});
Uncaught Unresolved (circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules:
weltmeister.weltmeister (requires: weltmeister.edit-entities)
weltmeister.edit-entities (requires: weltmeister.entities)
weltmeister.entities (requires: game.entities.mage)
Any idea what am I doing wrong? I am following the puck video! Thanks!
.requires {
'impact.entity'
}
ig.module {
'game.entities.mage'
}
.defines(function(){
EntityMage = ig.Entity.extend({
size: {x:48, y:48},
collides: ig.Entity.COLLIDES.FIXED,
animSheet: new ig.AnimationSheet( 'media/mage-1.png', 48, 48),
init: function(x, y, settings){
this.parent(x, y, settings);
this.addAnim( 'idle', 1, [0]);
this.vel.x = 0;
this.vel.y = 0;
},
update: function(){
if (ig.input.state('up')) {
this.vel.y = -100;
} else if (ig.input.state('down')) {
this.vel.y = 100;
} else {
this.vel.y = 0;
}
this.parent();
}
})
});