How do I change the colors of lines?
Camila

Hi,

 

In my game, i need to set the color to new lines when the connected is true.

 

The lines is a sprite with childs. How can a change the color of childs?

 

Thanks.

1 Comment
Gio

Hi Camila

 

Bit of a vague question, but I think I know what you're doing based on your previous posts. If your still following the flow-free tutorial, I think you want to just change the color property of the line SceneObject, since the sprite is looking at that property to determine what to draw. Once again, remember to call setDirtyArea to tell WADE to redraw the line:

lineObject.color = 'red';lineObject.getSprite().setDirtyArea();

If I'm misunderstanding what you want to do, please post some code of what you are doing at the moment to draw those lines and I'll look at it.

Post a reply
Add Attachment
Submit Reply
Login to Reply