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.
Preparing to extend the Loader to handle script loading.
- Loading branch information
1 parent
e8646de
commit 2fc5c89
Showing
9 changed files
with
422 additions
and
263 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create, update: update }); | ||
|
||
var background; | ||
var filter; | ||
|
||
function preload() { | ||
|
||
game.load.image('phaser', 'assets/sprites/phaser2.png'); | ||
|
||
} | ||
|
||
function create() { | ||
|
||
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'phaser'); | ||
logo.anchor.setTo(0.5, 0.5); | ||
|
||
background = game.add.sprite(0, 0); | ||
background.width = 800; | ||
background.height = 600; | ||
|
||
filter = game.add.filter('Fire', 800, 600); | ||
filter.alpha = 0.0; | ||
|
||
background.filters = [filter]; | ||
|
||
} | ||
|
||
function update() { | ||
|
||
filter.update(); | ||
|
||
} |
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
Oops, something went wrong.