1 decade ago by jch02140
When I tried to add an enemy type entity, the weltmeister editor and the game failed to load. They only load when I remove the entity js file that I created... I am not sure what is wrong in my code since I am still new to this engine...
Here is the js code for the entity:
Here is the js code for the entity:
ig.module( 'game.entities.ghoul' ) .requires( 'impact.entity', 'plugins.box2d.entity' ) .define(function(){ EntityEnemy = ig.Box2DEntity.extend({ size: {x: 18, y: 21}, offset: {x: 4, y: 2}, name: 'ghoul', health: 100, type.ig.Entity.TYPE.B, animSheet: new ig.AnimationSheet( 'media/ghoul.png', 18, 21), init: function( x, y settings){ this.parent( x, y settings); // Add the animations this.addAnim( 'walk', 1, [0,1]); } }) });