為什么我會(huì)顯示setScreen和getScreen有錯(cuò)
求解:
13行顯示The method setScreen(float) is undefined for the type Shouji錯(cuò)。
14行顯示The method getScreen() is undefined for the type Shouji錯(cuò)
求解:
13行顯示The method setScreen(float) is undefined for the type Shouji錯(cuò)。
14行顯示The method getScreen() is undefined for the type Shouji錯(cuò)
2018-07-25
舉報(bào)
2018-07-25
你的setScreen方法里面要給當(dāng)前對(duì)象賦值? 所以setScreen方法里面應(yīng)該是this.screen=newScreen;才對(duì)