mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Now using new strokePoints method
This commit is contained in:
parent
8ab00112bf
commit
475091ef41
1 changed files with 1 additions and 16 deletions
|
@ -13,23 +13,8 @@ var Draw = function (graphics, pointsTotal)
|
|||
{
|
||||
if (pointsTotal === undefined) { pointsTotal = 32; }
|
||||
|
||||
var start = this.getStartPoint();
|
||||
var points = this.getPoints(pointsTotal);
|
||||
|
||||
graphics.beginPath();
|
||||
|
||||
graphics.moveTo(start.x, start.y);
|
||||
|
||||
for (var i = 1; i < points.length; i++)
|
||||
{
|
||||
graphics.lineTo(points[i].x, points[i].y);
|
||||
}
|
||||
|
||||
graphics.strokePath();
|
||||
graphics.closePath();
|
||||
|
||||
// So you can chain graphics calls
|
||||
return graphics;
|
||||
return graphics.strokePoints(this.getPoints(pointsTotal));
|
||||
};
|
||||
|
||||
module.exports = Draw;
|
||||
|
|
Loading…
Reference in a new issue