Hi All,
Is there a method on a layer which is called every frame? Basically I want to have an update method on my layer that gets called each frame tick so I can do update stuff.
I noticed there is an update function but when overriding it in my layer it never gets called.
Thanks
Ok I have added my owner scheduler to the layer. I believe I am running at 50 fps.
this.schedule(this.update, 0.02);
Could someone confirm if this is best way of handling what I am looking for or is there a method already present?
Thanks
Yes,
If you want to called every frame, calling this.scheduleUpdate
is better than calling this.schedule(this.update, 0.02);
Please note the performance in the “update” function carefully, because it will be called every frame.
Hopes to help.
David
Thanks David that works like a charm.