-
Notifications
You must be signed in to change notification settings - Fork 7.1k
getTweensOf(target) tween manager #5260
Copy link
Copy link
Closed
Description
Version
- Phaser Version: Latest
- Operating system: Linux, Ubunut 20.04
- Browser: All
Description
getTweensOf(target) only return objects if the tween are active, i.e tweening. if a tween is done this method returns no object. is this the expected behavior?
Example Test Code
import * as Phaser from "phaser";
const sceneConfig: Phaser.Types.Scenes.SettingsConfig = {
active: false,
visible: false,
key: "Test"
};
var squareTest;
var tweenTest;
export class ClockScene extends Phaser.Scene {
constructor() {
super(sceneConfig);
}
public create() {
squareTest = this.add.rectangle(0, 0, 200, 200, 0xffff00)
tweenTest = this.add.tween({
targets: squareTest,
scaleX: 0.2,
scaleY: 0.2,
// angle: Phaser.Math.Between(-360, 360),
yoyo: true,
repeat: 1,
duration: 1000,
paused: true
});
public update(time,delta) {
console.log(this.tweens.getTweensOf(squareTest));
}
}
Additional Information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels