我试着从textfield中获取文本,并使其成为一个字符串,然后将该字符串转换为字符,但是这是行不通的。在这一行中我得到了一个错误:String string = TextField.getText();
错误声明: I:Cannot make a static reference to a non static
我尝试通过创建Game1类的对象来引用Game1类中的数组,该对象的定义为Game1 gameObject;,在构造函数中声明为gameObject = new Game1();,用法为gameObject.tileArray除了一些方法和变量外,game1类本身在其类代码中保持不变。当我尝试在TreeRegion类中使用这段代码时,它告诉我"Object reference not set to a in