mirror of
https://github.com/wassname/phaser.git
synced 2026-08-17 11:23:42 +08:00
Renamed Phaser.BitmapFont to Phaser.RetroFont because I believe it will cause confusion otherwise. Also tidied up the asset fonts folder.
This commit is contained in:
@@ -3,7 +3,7 @@ var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', { preload: p
|
||||
|
||||
function preload() {
|
||||
|
||||
game.load.bitmapFont('desyrel', 'assets/fonts/desyrel.png', 'assets/fonts/desyrel.xml');
|
||||
game.load.bitmapFont('desyrel', 'assets/fonts/bitmapFonts/desyrel.png', 'assets/fonts/bitmapFonts/desyrel.xml');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,9 @@ var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { create:
|
||||
|
||||
function create() {
|
||||
|
||||
var text = "- phaser -\nwith a sprinkle of\npixi dust";
|
||||
var style = { font: "65px Arial", fill: "#ff0044", align: "center" };
|
||||
var style = { font: "65px Arial", fill: "#ff0044", align: "center" };
|
||||
var text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nwith a sprinkle of\npixi dust", style);
|
||||
|
||||
var t = game.add.text(game.world.centerX, game.world.centerY, text, style);
|
||||
|
||||
t.anchor.setTo(0.5, 0.5);
|
||||
text.anchor.set(0.5);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user