freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于android環(huán)境的俄羅斯方塊畢業(yè)設(shè)計-資料下載頁

2025-06-23 15:53本頁面
  

【正文】 塊沒有到達(dá)最低時 if(!mIsPaused) { moveRight()。//向右移動 ()。//播放方塊移動的響應(yīng)聲音 } } //如果當(dāng)前的游戲狀態(tài)為STATE_PAUSE或STATE_MENU,不做出反應(yīng) else if(mGamestate == STATE_PAUSE) { } else if(mGamestate == STATE_MENU) { } break。 case : 。//按下回車鍵,不做出反應(yīng) case ://按下中間確定鍵 if(mGamestate == STATE_PLAY) {//若當(dāng)前狀態(tài)為STATE_PLAY,且方塊沒有到達(dá)最低時 if(!mIsPaused) { fastDrop()。//快速向下移動 ()。//播放方塊移動的響應(yīng)聲音 } } //如果當(dāng)前的游戲狀態(tài)為STATE_PAUSE或STATE_MENU,不做出反應(yīng) else if(mGamestate == STATE_PAUSE) { } else if(mGamestate == STATE_MENU) { } break。 // case ://若按下S鍵 if(mGamestate == STATE_PLAY) {//若當(dāng)前的游戲狀態(tài)為STATE_PLAY,置暫停狀態(tài)為true mIsPaused = true。 } else if(mGamestate == STATE_PAUSE) {//若當(dāng)前的游戲狀態(tài)已經(jīng)為暫停,置暫停狀態(tài)為false mIsPaused = false。 } else if(mGamestate == STATE_MENU) {//若當(dāng)前的游戲狀態(tài)為STATE_MENU,不做出反應(yīng) } break。 case ://若按下空格鍵 mIsPaused = !mIsPaused。//更改暫停狀態(tài)標(biāo)志 if(mIsPaused) {//若為暫停 ()。//中斷線程 } else { ()。//否則繼續(xù)執(zhí)行線程 } break。 default: 。 } return (keyCode,event)。////繼續(xù)執(zhí)行父類的其他點擊事件 } private void rotate()//翻轉(zhuǎn)方塊 { if(!mIsCombo)//若沒有到達(dá)最低點 (mCourt)。//調(diào)用TileView的相應(yīng)方法 } private void moveDown()//方塊向下運(yùn)動 { if(!mIsCombo)//若沒有到達(dá)最低點 { if( ! (mCourt) )//調(diào)用TileView的相應(yīng)方法 mIsCombo = true。//到達(dá)最低點,則mIsCombo置為true } } private void moveLeft()//方塊向左運(yùn)動 { if(!mIsCombo)//若沒有到達(dá)最低點 { (mCourt)。//調(diào)用TileView的相應(yīng)方法 } } private void moveRight()//方塊向右運(yùn)動 { if(!mIsCombo)//若沒有到達(dá)最低點 { (mCourt)。//調(diào)用TileView的相應(yīng)方法 } } private void fastDrop()//方塊快速向下運(yùn)動 { if(!mIsCombo)//若沒有到達(dá)最低點 { (mCourt)。//調(diào)用TileView的相應(yīng)方法 mIsCombo = true。//到達(dá)最低點,則mIsCombo置為true } } private void paintMenu(Canvas canvas)//畫出菜單界面 { (canvas,(),0,0)。//畫出背景 (canvas,(),0,SCREEN_HEIGHT/2 ().getHeight()/2 )。//畫出菜單 } private void paintGame(Canvas canvas)//畫出游戲界面 { //畫出游戲窗口,當(dāng)前的方塊,下一個方塊,分?jǐn)?shù)等等 (canvas)。 (canvas)。 (20)。 paintNextTile(canvas)。 paintSpeed(canvas)。 paintScore(canvas)。 paintDeLine(canvas)。 } private void paintNextTile(Canvas canvas)//畫出下一個方塊 { int i,j。 //在4*4的方格里繪制出方塊的形狀 for(i = 0。i4。i++) { for(j = 0。j4。j++) { if([i][j] != 0) { ( canvas,(()1), (int)(+getBlockDistance() + getBlockDistance((float) (i+)) ), (int)( getBlockDistance((float)(j+) ) ) )。 } } } } private void paintSpeed(Canvas canvas)//顯示當(dāng)前速度 { ()。 (等級:,getBlockDistance()+getRightMarginToCourt(), getBlockDistance(9),mPaint)。 ()。 ((mSpeed),getBlockDistance()+ 2*getRightMarginToCourt(), getBlockDistance(11),mPaint)。 } private void paintScore(Canvas canvas)//顯示當(dāng)前得分 { ()。 (得分:,getBlockDistance()+getRightMarginToCourt(), getBlockDistance(13),mPaint)。 ()。 ((mScore),getBlockDistance()+ 2*getRightMarginToCourt(), getBlockDistance(15),mPaint)。 } private void paintDeLine(Canvas canvas)//顯示當(dāng)前消去的行數(shù) { ()。 (消去行數(shù):,getBlockDistance()+getRightMarginToCourt(), getBlockDistance(17),mPaint)。 ()。 ((mDeLine),getBlockDistance()+2*getRightMarginToCourt(), getBlockDistance(19),mPaint)。 } private float getBlockDistance(float blockNum) { return blockNum * 。 } private float getRightMarginToCourt()//返回右邊界與游戲窗體的邊界 { return (float)。 } private void paintPause(Canvas canvas) { } private void paintOver(Canvas canvas)//繪制出游戲結(jié)束的界面 { paintGame(canvas)。 Paint paint = new Paint()。 (40)。//設(shè)置字體大小 (true)。//抗鋸齒 (0xe0,0xff,0x00,0x00)。//設(shè)置畫筆的顏色和透明度 (Game Over,getBlockDistance(1),getBlockDistance(),paint)。//輸出Game Over //(canvas,(),0,SCREEN_HEIGHT/2 ().getHeight()/2 )。 } public void run() { // TODO Autogenerated method stub while(!().isInterrupted() ) { Message ms = new Message()。 = 。 (ms)。 try { (/**/mMoveDelay)。//延時 } catch(InterruptedException e)//捕捉錯誤 { ().interrupt()。 } } } public void setLevel(int level)//設(shè)置游戲等級 { //根據(jù)游戲的等級設(shè)置方塊移動的速度 mSpeed = level。 mMoveDelay = (long) (600*( (double)mSpeed / ) )。 } public void setVoice(boolean isVoice)//設(shè)置聲音 { mIsVoice = isVoice。 (!mIsVoice)。 } public void restoreGame()//恢復(fù)游戲 { Properties pro = new Properties()。//創(chuàng)建一個文本文件對象 try { FileInputStream in = (DATAFILE)。//讀取數(shù)據(jù)庫文件,若不存在則創(chuàng)建 (in)。//載入信息到pro ()。//關(guān)閉in } catch(IOException e)//否則將錯誤信息寫入日志文件 { (TAG,file open failed in restoreGame())。 return。 } //將pro中的信息保存在各個變量中 mGamestate = ((gamestate).toString() )。 mSpeed = ((speed).toString() )。 setLevel(mSpeed)。 mScore = ((score).toString() )。 mDeLine = ((deLine).toString() )。 mIsVoice = ((isVoice).toString() )。 mIsCombo = ((isCombo).toString() )。 mIsPaused = ((isPaused).toString() )。 restoreCourt(pro)。//恢復(fù)游戲窗口 restoreTile(pro,mCurrentTile)。//恢復(fù)當(dāng)前的方塊 restoreTile(pro,mNextTile)。//恢復(fù)下一個方塊 } private void restoreCourt(Properties pro)//恢復(fù)游戲窗口 { int[][] matrix = ()。//創(chuàng)建游戲窗口矩陣 int i,j。 for(i = 0。i。i++) {//將pro文件中窗口矩陣復(fù)制到matrix中 for(j = 0。j。j++) { matrix[i][j] = ((courtMatrix+i+j).toString() )。 } } } private void restoreTile(Properties pro,TileView tile)//恢復(fù)方塊信息 { int[][] matrix = ()。//創(chuàng)建方塊矩陣 int i,j。 for(i = 0。i4。i++) {//將pro文件中方塊矩陣復(fù)制到matrix中 for(j = 0。j4。j++) { matrix[i][j] = ((tileMatrix+i+j).toString() )。 } } //將方塊的其它信息導(dǎo)出 (((tileColor).toString() ))。 (((tileShape).toString() ))。 (((tileOffsetX).toString() ))。 (((tileOffsetY).toString() ))。 } public void saveGame()//保存游戲 { Properties pro = new Properties()。//新建文本文件 //將游戲的當(dāng)前狀態(tài),等級,分?jǐn)?shù)等等的信息保存到pro中 (gamestate,(mGamestate))。 (speed,(mSpeed))。 (score,(mScore))。 (deLine,(mDeLine))。 Boolean b
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1