I need to make an urgent move when on click event I need to set an animation in typescript urgent help
i found The solution ,
-
Make a clean new Typescript,
-
create a subclass
-
use
example(){
var anim = this.getComponent(cc.Animation)
anim.play(“the animation name”)
} -
save this script
-
attach to node
-
drag your node to button event and find the class you create
-
save and play wallllaaaah it works
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.