forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It loops but still problems on the constructor
- Loading branch information
Webeled
committed
Sep 16, 2013
1 parent
fc584cf
commit bb9761a
Showing
6 changed files
with
71 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
$title = "Canvas Smoothing"; | ||
require('../head.php'); | ||
?> | ||
|
||
<script type="text/javascript"> | ||
|
||
(function () { | ||
|
||
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create }); | ||
|
||
function preload() { | ||
|
||
game.load.image('boss', 'assets/misc/boss1.png'); | ||
game.load.spritesheet('button', 'assets/buttons/button_sprite_sheet.png', 193, 71); | ||
|
||
} | ||
var boss, | ||
button; | ||
|
||
function create() { | ||
|
||
// For browsers that support it, this keeps our pixel art looking crisp | ||
//Phaser.Canvas.setSmoothingEnabled(game.stage.canvas.context, false); | ||
|
||
boss = game.add.sprite(game.world.centerX, game.world.centerY, 'boss'); | ||
boss.anchor.setTo(0.5, 0.5); | ||
// Zoom in each time we press it | ||
button = game.add.button(32, 32, 'button', clickedIt, this, 2, 1, 0); | ||
} | ||
|
||
function clickedIt() { | ||
boss.scale.x += 0.5; | ||
boss.scale.y += 0.5; | ||
} | ||
|
||
})(); | ||
|
||
</script> | ||
|
||
<?php | ||
require('../foot.php'); | ||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters