Skip to content

Commit 6776b94

Browse files
committed
Allow Impact.Sprite#setVelocity to accept 1 parameter
1 parent 5690e62 commit 6776b94

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/physics/impact/components/Velocity.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ var Velocity = {
1616

1717
setVelocity: function (x, y)
1818
{
19+
if (y === undefined) { y = x; }
20+
1921
this.vel.x = x;
2022
this.vel.y = y;
2123

0 commit comments

Comments
 (0)