mirror of
https://github.com/wassname/phaser.git
synced 2026-07-20 12:30:48 +08:00
Fixed an error that stopped 2 tweens from being able to run on the same object. Also refactored a lot of the classes to remove prototype properties and move them to local instance properties.
This commit is contained in:
@@ -55,22 +55,11 @@ Phaser.TweenManager.prototype = {
|
||||
* Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.
|
||||
*
|
||||
* @param obj {object} Object the tween will be run on.
|
||||
* @param [localReference] {bool} If true the tween will be stored in the object.tween property so long as it exists. If already set it'll be over-written.
|
||||
* @return {Phaser.Tween} The newly created tween object.
|
||||
*/
|
||||
create: function (object, localReference) {
|
||||
create: function (object) {
|
||||
|
||||
localReference = localReference || false;
|
||||
|
||||
if (localReference)
|
||||
{
|
||||
object['tween'] = new Phaser.Tween(object, this.game);
|
||||
return object['tween'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Phaser.Tween(object, this.game);
|
||||
}
|
||||
return new Phaser.Tween(object, this.game);
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user