11
2- var game = new Phaser . Game ( 800 , 600 , Phaser . CANVAS , 'phaser-example ' , { preload : preload , create : create , update : update , render : render } ) ;
2+ var game = new Phaser . Game ( 800 , 600 , Phaser . CANVAS , '' , { preload : preload , create : create , update : update , render : render } ) ;
33
44function preload ( ) {
55
6- game . load . image ( 'pic' , 'assets/pics/backscroll .png' ) ;
6+ game . load . image ( 'pic' , '../ assets/pics/questar .png' ) ;
77
88}
99
@@ -12,33 +12,26 @@ var bmd;
1212
1313function create ( ) {
1414
15- bmd = game . add . bitmapData ( 800 , 600 ) ;
16- bmd . fillStyle ( 'rgba(255,0,0,0.2)' ) ;
17- // bmd.fillRect(0, 0, 300, 100);
18- // bmd.fillRect(0, 200, 300, 100);
15+ game . add . image ( 0 , 0 , 'pic' ) ;
1916
20- image = game . add . image ( 0 , 0 , bmd ) ;
21- // image.anchor.set(0.5);
17+ console . log ( 'pic?' ) ;
2218
23- game . input . onDown . add ( tint , this ) ;
19+ // bmd = game.add.bitmapData(800, 600);
20+ // bmd.context.fillStyle = 'rgba(255,0,0,0.2)';
21+ // bmd.context.fillRect(0, 0, 300, 100);
2422
25- }
26-
27- function tint ( ) {
28-
29- image . tint = Math . random ( ) * 0xFFFFFF ;
23+ // image = game.add.image(0, 0, bmd);
3024
3125}
3226
3327function update ( ) {
3428
35- bmd . fillStyle ( 'rgba(255,0,0,0.2)' ) ;
36- bmd . fillRect ( game . input . x , game . input . y , 6 , 6 ) ;
29+ // bmd.context.fillRect(game.input.x, game.input.y, 8, 8);
3730
3831}
3932
4033function render ( ) {
4134
42- game . debug . renderText ( game . input . x , 32 , 32 ) ;
35+ // game.debug.renderText(game.input.x, 32, 32);
4336
4437}
0 commit comments