mirror of
https://github.com/wassname/phaser.git
synced 2026-08-05 13:21:00 +08:00
Converted the Pixi.Ellipse class.
This commit is contained in:
@@ -9,12 +9,14 @@ function preload() {
|
||||
}
|
||||
|
||||
var text;
|
||||
var b;
|
||||
|
||||
function create() {
|
||||
|
||||
game.stage.backgroundColor = '#2d2d2d';
|
||||
|
||||
text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nwith a sprinkle of\npixi dust");
|
||||
// text = game.add.text(game.world.centerX, game.world.centerY, "- phaser -\nwith a sprinkle of\npixi dust");
|
||||
text = game.add.text(game.world.centerX, game.world.centerY, "- phaser - with a sprinkle of pixi dust");
|
||||
|
||||
text.anchor.setTo(0.5);
|
||||
|
||||
@@ -30,14 +32,14 @@ function create() {
|
||||
// text.fill = grd;
|
||||
|
||||
text.fill = '#ff0044';
|
||||
text.lineSpacing = 16;
|
||||
// text.lineSpacing = 16;
|
||||
text.align = 'center';
|
||||
text.stroke = '#000000';
|
||||
text.strokeThickness = 2;
|
||||
|
||||
// text.setShadow(5, 5, 'rgba(0,0,0,0.5)', 5);
|
||||
// text.wordWrap = true;
|
||||
// test.wordWrapWidth = 50;
|
||||
text.wordWrap = true;
|
||||
text.wordWrapWidth = 50;
|
||||
|
||||
// game.input.onDown.add(change, this);
|
||||
|
||||
@@ -68,12 +70,14 @@ function change() {
|
||||
}
|
||||
|
||||
function update() {
|
||||
b = text.getBounds();
|
||||
|
||||
|
||||
}
|
||||
|
||||
function render() {
|
||||
|
||||
game.debug.renderRectangle(b);
|
||||
// game.debug.renderText(sprite.position.y, 32, 32);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user