哪位帮我注释下下面的程序是什么意思?稍微注释下就可以了,protected void onPause() {// TODO Auto-generated method stubgameView.gameState = GameView.STATE_LOST;super.onPause();}@Overridepublic boolean onKeyDown(int keyCode,KeyEve
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/22 12:59:23
哪位帮我注释下下面的程序是什么意思?稍微注释下就可以了,protected void onPause() {// TODO Auto-generated method stubgameView.gameState = GameView.STATE_LOST;super.onPause();}@Overridepublic boolean onKeyDown(int keyCode,KeyEve
哪位帮我注释下下面的程序是什么意思?稍微注释下就可以了,
protected void onPause() {
// TODO Auto-generated method stub
gameView.gameState = GameView.STATE_LOST;
super.onPause();
}
@Override
public boolean onKeyDown(int keyCode,KeyEvent event) {
// TODO Auto-generated method stub
gameView.onKeyDown(keyCode,event);
return super.onKeyDown(keyCode,event);}
@Override
public boolean onKeyUp(int keyCode,KeyEvent event) {
// TODO Auto-generated method stub
gameView.onKeyUp(keyCode,event);
return super.onKeyUp(keyCode,event);}}
哪位帮我注释下下面的程序是什么意思?稍微注释下就可以了,protected void onPause() {// TODO Auto-generated method stubgameView.gameState = GameView.STATE_LOST;super.onPause();}@Overridepublic boolean onKeyDown(int keyCode,KeyEve
protected void onPause() {//受保护的方法,只有本类或者直接子类可以访问,根据字面的意思是暂停功能
// TODO Auto-generated method stub
gameView.gameState = GameView.STATE_LOST;//这个就你这点代码是看不出来干吗的
super.onPause();//调用父类的onPause方法
}
@Override
public boolean onKeyDown(int keyCode,KeyEvent event) {//当按键按下的时候触发的事件,keyCode按键编号,event事件源
// TODO Auto-generated method stub
gameView.onKeyDown(keyCode,event);
return super.onKeyDown(keyCode,event);}
@Override
public boolean onKeyUp(int keyCode,KeyEvent event) {//当按键放开的时候触发的事件,keyCode按键编号,event事件源
// TODO Auto-generated method stub
gameView.onKeyUp(keyCode,event);
return super.onKeyUp(keyCode,event);}}
就你这些代码是看不出什么名堂的