mirror of
https://github.com/wassname/phaser.git
synced 2026-10-03 12:42:08 +08:00
Lots of TypeScript defs updates for the new Physics / Body classes.
This commit is contained in:
1 parent
846e9c5061
commit
8e77e8cedb
2 files changed
+131
-72
No files matched your search
+3
-2
@@ -61,6 +61,7 @@ Phaser.Line.prototype = {
|
||||
* @param {Phaser.Sprite} startSprite - The coordinates of this Sprite will be set to the Line.start point.
|
||||
* @param {Phaser.Sprite} endSprite - The coordinates of this Sprite will be set to the Line.start point.
|
||||
* @param {boolean} [useCenter=true] - If true it will use startSprite.center.x, if false startSprite.x.
|
||||
* @return {Phaser.Line} This line object
|
||||
*/
|
||||
fromSprite: function (startSprite, endSprite, useCenter) {
|
||||
|
||||
@@ -68,11 +69,11 @@ Phaser.Line.prototype = {
|
||||
|
||||
if (useCenter)
|
||||
{
|
||||
this.setTo(startSprite.center.x, startSprite.center.y, endSprite.center.x, endSprite.center.y);
|
||||
return this.setTo(startSprite.center.x, startSprite.center.y, endSprite.center.x, endSprite.center.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setTo(startSprite.x, startSprite.y, endSprite.x, endSprite.y);
|
||||
return this.setTo(startSprite.x, startSprite.y, endSprite.x, endSprite.y);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user