Added sample project files.

This commit is contained in:
photonstorm
2017-07-31 17:17:07 +01:00
parent f211da59f6
commit bf0e27242b
6 changed files with 99 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import 'phaser';
var config = {
type: Phaser.AUTO,
parent: 'phaser-example',
width: 800,
height: 600,
scene: {
preload: preload,
create: create
}
};
var game = new Phaser.Game(config);
function preload ()
{
this.load.image('logo', 'assets/logo.png');
}
function create ()
{
var logo = this.add.image(400, 150, 'logo');
this.tweens.add({
targets: logo,
y: 450,
duration: 2000,
ease: 'Power2',
yoyo: true,
loop: -1
});
}