Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让我获得以前重点关注的演员。因为当我销毁当前以按键为中心的演员时,我无法在按键时调用回调函数。无论如何我可以专注于以前的演员。
您将需要在舞台上使用某种“焦点管理器”来保留一堆已获得焦点的演员。
管理者可以监控舞台上的“key-focus”属性。然后它必须连接到actor上的“destroy”信号,以在它们不再有效时从堆栈中删除它们。
当关注的actor被销毁时,只需获取堆栈中的下一个actor(如果您在销毁信号时从堆栈中修剪项目,这仍然有效。)