Jump to content

[SOLVED]Text emoji as game graphics?


Recommended Posts

Okay so I'm creating game sprites like so: 

game.create = function() {

   this.player = this.add.text(0, 0, "?", {
    font: '64px Sans Open'



I'm intending to animate them by switching to different emoji.  Throw up animation for example: ?>?>?

All the animation info I come across pertains to animating sprite sheets (understandably so).

Forgive me, I'm brand new to Phaser, but this is what I tried:

let timelineTween = this.tweens.createTimeline();
    targets: this.player,
    duration: 600,
    x: newItem.x,
    y: newItem.y,
    onComplete: function() {
      gameScene.add.tween(this).to({ alpha: 1 }, 2000, "Linear", true);
      this.targets[0].text = "?";

Although it did change the text value of player, it didn't render any differently on screen.

Link to comment
Share on other sites

  • 4 weeks later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...