Fix: move round_rect_button.js to src/lib/js

This commit is contained in:
2018-05-03 16:20:29 +09:00
parent f1a263b882
commit 6cd48f238d
7 changed files with 4 additions and 5 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

+19
View File
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<!-- <script src="https://labs.phaser.io/build/phaser-arcade-physics.min.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/phaser@3.6.0/dist/phaser.min.js"></script>
</head>
<body>
<div id="PhaserSample" style="text-align:center;" />
<script>
$(document).ready(function(){
$.getScript( "phaser_sample_main.js", function() {});
});
</script>
<!-- <script src="./phaser_sample.js"></script> -->
</body>
</html>
+47
View File
@@ -0,0 +1,47 @@
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
physics: {
default: 'arcade',
arcade: {
gravity: { y: 200 }
}
},
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload ()
{
this.load.setBaseURL('http://labs.phaser.io');
this.load.image('sky', 'assets/skies/space3.png');
this.load.image('logo', 'assets/sprites/phaser3-logo.png');
this.load.image('red', 'assets/particles/red.png');
}
function create ()
{
this.add.image(400, 300, 'sky');
var particles = this.add.particles('red');
var emitter = particles.createEmitter({
speed: 100,
scale: { start: 1, end: 0 },
blendMode: 'ADD'
});
var logo = this.physics.add.image(400, 100, 'logo');
logo.setVelocity(100, 200);
logo.setBounce(1, 1);
logo.setCollideWorldBounds(true);
emitter.startFollow(logo);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB