Jump to content

How to use tween.onUpdate in typescrpt


Morokkoikitai
 Share

Recommended Posts

hello.

i want to know how to path context to tween.onupdate.

i.e

-----------------------------------------------------------

                let t = this.tweens.add({
                    targets: this.follower,
                    t:1,
                    ease: 'Sine.easeInOut',
                    duration: this.curve.getLength(),
                    onUpdate: function() {
                            this.player.x = this.follower.vec.x
                            this.player.y = this.follower.vec.y
                     },
                })

------------------------------------------------------

is not work.

thanks.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...