Converted the Pixi.Ellipse class.

This commit is contained in:
photonstorm
2014-02-10 01:18:53 +00:00
parent e15bebd269
commit f9f2f2a9ae
5 changed files with 313 additions and 10 deletions
+8 -4
View File
@@ -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);
}