Jump to content

Text Popup During Collision


Ech0_2G
 Share

Recommended Posts

I am wanting some text to popup during a collision with an immoveable object in a top down game. I have the collision detection all set up, I can run a console.log of the message I want to display during the collision and it works, however if I try using the following code to display text, nothing happens.

var text_options = {       font: '32px Arial',       fill: '#ffffff',       align: 'center'};var text = this.game.add.text(this.game.world.centerX, this.game.world.centerY, sign.message, text_options);text.anchor.set(0.5);

You can find the game I'm working on at this link. If you use the arrow keys to walk into the sign (slightly north east from the spawn position) and watch the console you will see the message, but the text refuses to show anywhere.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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