create ()
{
// it will draw a green circle
var graphics = this.add.graphics({ lineStyle: { width: 2, color: 0x00ff00 } });
var circle = new Phaser.Geom.Circle(400, 300, 200);
graphics.strokeCircleShape(circle);
// from here onwards nothing happens
// (circle stays green when it should change to red)
graphics.lineStyle({ color: 0xff0000 });
graphics.clear();
graphics.strokeCircleShape(circle);
}
Ohhhhhhhhh it worked perfectly now. The problem was the way as I was trying to change the parameters (did it the same way as it was passed to graphics). Funny that it didn’t raised any error…