我的动画有问题;这是我的代码:
window.addEventListener('load', function(){
var Q =window.Q= Quintus().include("Sprites, Scenes,2D, Anim").setup({maximize:true});
Q.Sprite.extend('user',{
init:function(p){
this._super({sheet:"user",sprite:"user",
x:p.x,y:p.y,vx:p.vx,vy:p.vy});
this.add("animation");
},
step:function(dt){
this.play("walk");
}
});
Q.scene("scene1",function(stage){
var sprite1=stage.insert(new Q.user({x:200,y:20,vx:0,vy:0}));
});
Q.load("sprites.json,sprites.png",function()
{
Q.compileSheets("sprites.png","sprites.json");
Q.animations('user',{walk:{frames:[0,1],rate:1/15}});
Q.stageScene("scene1");
})
});
我得到的错误如下:
未捕获的类型错误:无法调用未定义的方法 'draw',quintus-all.js:4185