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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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