MCPcopy
hub / github.com/ssusnic/Machine-Learning-Flappy-Bird / Text

Function Text

source/gameplay.js:402–411  ·  view source on GitHub ↗
(game, x, y, text, align, font)

Source from the content-addressed store, hash-verified

400/***********************************************************************************/
401
402var Text = function(game, x, y, text, align, font){
403 Phaser.BitmapText.call(this, game, x, y, font, text, 16);
404
405 this.align = align;
406
407 if (align == "right") this.anchor.setTo(1, 0);
408 else this.anchor.setTo(0.5);
409
410 this.game.add.existing(this);
411};
412
413Text.prototype = Object.create(Phaser.BitmapText.prototype);
414Text.prototype.constructor = Text;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected