Jump to content

animate RetroFont "texture" ? (eg customSpacingX)


jmp909
 Share

Recommended Posts

Hi,

 

I'm wondering if it's possible to animate the parameters of a RetroFont and render this back to the image using it.

 

create:

font = this.game.add.retroFont("yellowredfont",8,7, '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`<|>~£@',35,6,7,0,0);font.multiLine=truefont.customSpacingX=8img = this.game.add.image(20, 50, font);font.text = "Hello World!"

update:

font.customSpacingX = (font.customSpacingX+1) % 20// how to update the image with the updated font? does it all have to be destroyed and recreated?

thanks

j

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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