我的 Actor 是Label
。当我按名称获取它时,找不到 setText(...);
方法。
我用过:
stage.getRoot().findActor("name"). // setText not exist
如何找到Label
Actor ?
最佳答案
在使用之前您可能需要转换为 Label:
Label labelActor = (Label) stage.getRoot().findActor("name");
labelActor.setText("abc");
关于java - libGDX : get Label actor from stage by name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32942639/