Javascript 韩元';冲击载荷
我无法使用ImpactJs加载关卡。当我尝试加载到某个级别时,控制台中出现以下错误: 未捕获无法加载资源:loader.js:91 ig.Loader.ig.Class.extend.\u loadCallback Loader.js:91 ig.Image.ig.Class.extend.onerror 我在我的level文件夹中保存了一个名为map1的level,并加载了以下代码:Javascript 韩元';冲击载荷,javascript,impactjs,Javascript,Impactjs,我无法使用ImpactJs加载关卡。当我尝试加载到某个级别时,控制台中出现以下错误: 未捕获无法加载资源:loader.js:91 ig.Loader.ig.Class.extend.\u loadCallback Loader.js:91 ig.Image.ig.Class.extend.onerror 我在我的level文件夹中保存了一个名为map1的level,并加载了以下代码: ig.module( 'game.main' ) .requires( 'impa
ig.module(
'game.main'
)
.requires(
'impact.game',
'impact.font',
'game.levels.map1'
)
.defines(function(){
MyGame = ig.Game.extend({
init: function() {
// Initialize your game here; bind keys etc.
this.loadLevel( LevelMap1 );
},
update: function() {
// Update all entities and backgroundMaps
this.parent();
// Add your own, additional update code here
},
draw: function() {
// Draw all entities and backgroundMaps
this.parent();
}
});
// Start the Game with 60fps, a resolution of 320x240, scaled
// up by a factor of 2
ig.main( '#canvas', MyGame, 60, 960, 960, 1 );
});
有人能看出我哪里做错了吗?谢谢:)尝试使用:
像这样:
.requires(
'impact.game',
'impact.font',
'plugins.impact-splash-loader',
//...
});
及
否则,您可能丢失了一个图像…有
影响。font
根据需要。是否需要在extend()中添加类似font:new-ig.font('media/04b03.font.png')、
之类的内容?只是猜测…看看这个。奇怪,但也许能帮上忙。
ig.main( '#canvas', MyGame, 60, 960, 960, 1 , ig.ImpactSplashLoader );