<!DOCTYPE html>
<html lang="en">
<head>
<title>App</title>
<script src="https://cdn.jsdelivr.net/npm/phaser@3.15.1/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
new Phaser.Game({
width: 800,
height: 600,
physics: {
default: 'arcade',
arcade: {
gravity: {
y: 100
}
}
},
scene: {
preload: function () {
this.load.image('pineapple', 'pineapple.png');
this.load.image('apple', 'apple.png')
},
create: function () {
const particles = this.add.particles('pineapple');
const emitter = particles.createEmitter({
speed: 100,
scale: {
start: 0.5,
end: 0
}
});
const logo = this.physics.add.image(0, 0, 'apple');
logo.setVelocity(1000, 1500);
logo.setBounce(1, 1);
logo.setCollideWorldBounds(true);
emitter.startFollow(logo);
}
}
});
</script>
</body>
</html>
以上所述就是小编给大家介绍的《Phaser大杂烩》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
ASP.NET 2.0技术内幕
埃斯帕斯托 / 施平安 / 清华大学出版社 / 2006-8 / 68.00元
《ASP.NET2.0技术内幕》围绕着ASP.NET 2.0是Web开发的重要分水岭这一主题,采用自顶向下的方式介绍ASP.NET 2.0的最新编程实践,从更广泛的特征到具体的实现和编程细节,充分展示了ASP.NET的最新编程实践。全书共15章,主题涉及HTTP运行库、安全性、缓存、状态管理、控件、数据绑定和数据访问。 《ASP.NET2.0技术内幕》主题丰富,讲解透彻,包含大量实例,是......一起来看看 《ASP.NET 2.0技术内幕》 这本书的介绍吧!