mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Animation.setCurrentFrame
will no longer try to call setOrigina
or updateDisplayOrigin
if the Game Object doesn't have the Origin component, preventing unknown function errors.
This commit is contained in:
parent
009dad281f
commit
4de9d52769
1 changed files with 9 additions and 6 deletions
|
@ -1020,6 +1020,8 @@ var Animation = new Class({
|
|||
|
||||
gameObject.setSizeToFrame();
|
||||
|
||||
if (gameObject._originComponent)
|
||||
{
|
||||
if (animationFrame.frame.customPivot)
|
||||
{
|
||||
gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);
|
||||
|
@ -1028,6 +1030,7 @@ var Animation = new Class({
|
|||
{
|
||||
gameObject.updateDisplayOrigin();
|
||||
}
|
||||
}
|
||||
|
||||
return gameObject;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue