Wednesday, December 7, 2022
HomeGame DevelopmentDirector scheduler Api name change argument change from 2.x to three.x -...

Director scheduler Api name change argument change from 2.x to three.x – Cocos Creator


I’ve moved from 2.x to three.x
I’m utilizing director.getScheduler().pauseTarget(this.targetNode) — the place this.targetNode — was node in 2.x
However in 3.x it says it ought to be ISchedulable. then anybody assist me out find out how to use it


director.getScheduler().pauseTarget(nodeComponent)
do this

right here this.targetNode is already a node what u imply by nodeComponent,
and declaration file say it param cross ought to be of ISchedule sort

Thanks
director.getScheduler().pauseTarget(this.targetNode);
It’s also working once I outline sort of targetNode it was utilizing HTML node as an alternative of Cocos Node
corrected the import now it’s working nice/
Thanks for help

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments