简体   繁体   English

如何防止 Korge 视图更新?

[英]How can I prevent Korge views from updating?

I have an addFixedUpdater { } block attached to a view that is being executed on every frame.我有一个addFixedUpdater { }块附加到在每一帧上执行的视图。 Is there a way to pause that block temporarily?有没有办法暂时暂停该块?

KorGE Views have a chainable speed property that acts as a multiplier. KorGE Views 有一个可链接的speed属性,它充当乘数。 By default all the views have that property set to 1.0.默认情况下,所有视图都将该属性设置为 1.0。 If you set to 2.0 your blocks will be executed twice the times, while 0.5 make it to be executed half the times.如果您设置为 2.0,您的块将被执行两次,而 0.5 则使其被执行一半。 In this case, to prevent the addFixedUpdater to be executed for a View subtree, you can just set the speed property to 0.0.在这种情况下,为了防止对 View 子树执行 addFixedUpdater,您只需将speed属性设置为 0.0。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM