Skip to content

Commit

Permalink
Remove effect when tween complete
Browse files Browse the repository at this point in the history
  • Loading branch information
rexrainbow committed Jul 17, 2023
1 parent fb273e7 commit 426c283
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/effect-properties/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Demo extends Phaser.Scene {
tweenTask = this.tweens.add({
targets: image,
revealDown: 1
}).once('complete', function () {
image.revealDown = null;
})
break;

Expand All @@ -38,6 +40,8 @@ class Demo extends Phaser.Scene {
tweenTask = this.tweens.add({
targets: image,
revealRight: 1
}).once('complete', function () {
image.revealRight = null;
})
break;

Expand All @@ -46,6 +50,8 @@ class Demo extends Phaser.Scene {
tweenTask = this.tweens.add({
targets: image,
revealUp: 1
}).once('complete', function () {
image.revealUp = null;
})
break;

Expand All @@ -54,6 +60,8 @@ class Demo extends Phaser.Scene {
tweenTask = this.tweens.add({
targets: image,
revealLeft: 1
}).once('complete', function () {
image.revealLeft = null;
})
break;

Expand Down

0 comments on commit 426c283

Please sign in to comment.