var app = new PIXI.Application(600,500);
document.body.appendChild(app.view);
var bg = new PIXI.Sprite.fromImage("res/pao/ground01_2.png");
app.stage.addChild(bg);
bg.y = 300;
var ball = new PIXI.Sprite.fromImage("res/lianxi/llball/ball.png");
app.stage.addChild(ball);
ball.y = 240;
function animate() {
ball.x+=1;
if(ball.x>=280 && ball.x<=440){
ball.y+=;
}
}
app.ticker.add(animate);
function animate() {
ball.x+=1;
if(ball.x>=280 && ball.x<=440){
ball.y+=1;
}
}
有用望采纳