Commit f9dead57 authored by wildfirecode's avatar wildfirecode

1

parent 2a9be4b5
......@@ -2,8 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,user-scalable=no">
<title>Document</title>
</head>
<body>
......
import Piece from './Piece';
import Scene from './Scene';
let gameconfig = {
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', ()=>{
stage.update()
});``
\ No newline at end of file
function update() {
//
}
\ 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