jef
1
Hi phaser’s guys,
Is it possible to change the color of a graphics once it has already been created?
The fillStyle Method (mygraphics.fillStyle(0x44ff44,1) as defined in https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Graphics.html doesn’t seem to work in this case : In fact I guess the fillStyle Method is functionnal only for graphics instantiation…
Thanks for any help!
samme
2
Graphics have to be cleared and redrawn.
1 Like
jef
3
Thanks, that’s what I thought… I dont understand why this possibility has not been implemented…
samme
4
You can use a Shape instead, maybe.
2 Likes
jef
5
It works with a shape and setFillStyle. thanks for this solution.
1 Like