Jump to content

Quick question about texts and groups


GabrielKnight
 Share

Recommended Posts

Hello,

Please help, I'm trying to explain my problem.

function create() {fl = game.add.group();...

and we create constructor:

flyingScore = function() {this.object = game.add.text(100, 540, "TEST", { font: "18px MS Sans Serif"}, fl);}

after action

new flyingScore();

and my update() function

fl.x += 1;fl.y -=1;

And question. After action we create new object by flyingScore constructor and put in the group "fl". When object creates for first time, it works well, but if I create another object with constructor - new object doesn't appear. How to create new texts every time and control with whole group ?

 

Sorry for stupid question.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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