Commit f9dead57 authored by wildfirecode's avatar wildfirecode

1

parent 2a9be4b5
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title> <title>Document</title>
</head> </head>
<body> <body>
......
import Piece from './Piece'; let gameconfig = {
import Scene from './Scene'; type: Phaser.AUTO,
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update
}
};
const stage = new createjs.StageGL('gameCanvas'); let game = new Phaser.Game(gameconfig);
const scene = new Scene(); function preload() {
this.load.image('back', 'assets/back.png');
this.load.image('bone', 'assets/bone.png');
this.load.image('front', 'assets/front.png');
}
stage.addChild(scene); function create() {
this.add.image(106, 106, 'back');
// this.add.image(400, 300, 'bone');
}
createjs.Ticker.on('tick', ()=>{ function update() {
stage.update() //
});`` }
\ No newline at end of file \ No newline at end of file
let gameconfig = {
type: Phaser.AUTO,
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update
}
};
let game = new Phaser.Game(gameconfig);
function preload() {
this.load.image('sky', 'assets/sky.png');
this.load.image('ground', 'assets/platform.png');
this.load.image('star', 'assets/star.png');
this.load.image('bomb', 'assets/bomb.png');
}
function create() {
this.add.image(400, 300, 'sky');
this.add.image(400, 300, 'star');
}
function update() {
//
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment