mirror of
https://github.com/wassname/phaser.git
synced 2026-06-28 16:20:37 +08:00
3568dc4ff1
Fixed Time.totalElapsedSeconds, which gets the other filters working again too.
19 lines
447 B
JavaScript
19 lines
447 B
JavaScript
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create });
|
|
|
|
function preload() {
|
|
|
|
game.load.image('phaser', 'assets/sprites/phaser2.png');
|
|
game.load.script('gray', '../filters/Gray.js');
|
|
|
|
}
|
|
|
|
function create() {
|
|
|
|
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'phaser');
|
|
logo.anchor.setTo(0.5, 0.5);
|
|
|
|
var gray = game.add.filter('Gray');
|
|
|
|
logo.filters = [gray];
|
|
|
|
} |