mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
LineCurve can take an array of points now
This commit is contained in:
parent
6bc39a82c2
commit
c4f9c41c53
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,12 @@ var LineCurve = new Class({
|
|||
// vec2s
|
||||
function LineCurve (v1, v2)
|
||||
{
|
||||
if (Array.isArray(v1))
|
||||
{
|
||||
v2 = new Vector2(v1[2], v1[3]);
|
||||
v1 = new Vector2(v1[0], v1[1]);
|
||||
}
|
||||
|
||||
Curve.call(this);
|
||||
|
||||
this.v1 = v1;
|
||||
|
|
Loading…
Reference in a new issue