




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
PAGE44C#編程結(jié)課設(shè)計(jì)說明書荊楚理工學(xué)院<<C#編程>>結(jié)課設(shè)計(jì)說明書學(xué)生姓名:姚元美梁貴波楊爽學(xué)號(hào):10EN40401026120084040102482008404010238專業(yè):計(jì)算機(jī)科學(xué)與技術(shù)班級(jí):計(jì)算機(jī)08-2任課教師:游明坤游戲編程概述完成任務(wù)程序運(yùn)行界面如圖1.1所示:圖1.1計(jì)算機(jī)信息查看器主界面分析功能分析新局:?jiǎn)螕糇髠?cè)會(huì)出現(xiàn)連連看游戲運(yùn)行界面,進(jìn)入游戲。提示:用戶可以在找不到一樣的圖案的時(shí)候點(diǎn)擊提示,會(huì)出現(xiàn)兩個(gè)可以撤銷的類似圖案。重排:左邊圖案會(huì)重新編排一次。配置:用戶可以對(duì)游戲的相關(guān)選項(xiàng)進(jìn)行設(shè)置。退出:退出游戲。界面分析運(yùn)行界面如下:如圖1.1所示,程序主體界面可分為三部分:第一部分是以執(zhí)行游戲的部分,第二部分是以游戲設(shè)置以及幫助的部分,第三部分就是游戲在運(yùn)行時(shí)所剩時(shí)間提示。第一部分含1個(gè)控件:11個(gè)列表視圖(listview)。第二部分含8個(gè)控件:6個(gè)按鈕(button)2個(gè)標(biāo)簽(label)。在2個(gè)label中,2個(gè)用于顯示提示,1個(gè)復(fù)選項(xiàng),分別用于顯示相應(yīng)的“詳細(xì)信息”。第三部分含3個(gè)控件:1個(gè)label,1個(gè)顯示提示,還有一個(gè)。界面的詳細(xì)布局如圖1.1所示。程序分析本程序的核心是游戲執(zhí)行部分,所有的操作都圍繞著該數(shù)據(jù)進(jìn)行的。游戲分為三關(guān):簡(jiǎn)單、一般和難。為了用戶在規(guī)定時(shí)間完成一關(guān),設(shè)計(jì)了提示和重排。其中新局是開始游戲的意思,退出也就意味著結(jié)束游戲。實(shí)現(xiàn)步驟建立工程建立C#Windows窗體應(yīng)用程序Game項(xiàng)目。界面設(shè)計(jì)根據(jù)圖1.1的樣式,設(shè)計(jì)出查看器的窗體布局。主程序功能實(shí)現(xiàn)(1)定義主程序類對(duì)象GameMain。(2)加載數(shù)據(jù)。使用ComputerManager的Load方法從文件中加載信息,如果存在文件,則將文件中的計(jì)算機(jī)對(duì)象填充到ListView。如果不存在,則創(chuàng)建不同類型的計(jì)算機(jī),并添加到泛型集合中,填充到ListView中。(3)窗體設(shè)計(jì)器生成的代碼中的數(shù)據(jù)到Dispose: privatevoidEndGame(), privatevoidWinGame()。時(shí)間觸發(fā) privatevoidtimeOutTimer_Tick(objectsender,EventArgse)。(4)初始化集合泛型數(shù)據(jù):privatevoidInitGame()。如果從本地文件加載泛型集合數(shù)據(jù)失敗,則由程序初始化數(shù)據(jù),填充到泛型集合。(5)給下壓式按鈕添加事件處理。 核心代碼usingSystem;usingSystem.Collections;usingSystem.ComponentModel;usingSystem.Drawing;usingSystem.IO;usingSystem.Windows.Forms;usingLLK.ACTION;usingLLK.UI;namespaceLLK{ publicclassGameMain:Form { privateIContainercomponents; privateCheckBoxAutoClear; privateTimerlineTimer; privateButtonbtnReset; privateButtonbtnInfo; privateButtonbtnRePlay; privateLabellbP; privateLabellbInfoCount; privateLabellabel3; privateButtonbtnExit; privateProgressBarpBar; privateTimertimeOutTimer; privateLabellbTimeOut; privatePictureBoxpictureBox1; privateLabellabel1; privateLabellbCaption; privateCheckBoxAutoReset; privateButtonbtnAbout; privateButtonbtnConfig; privateScreenDrawSD=null; privateLinesearch_p1=null; privateLinesearch_p2=null; privateboolisSearch=false; privateintPointCount=0; privateintInfoCount=5; privateconstintGameTimeSec=60; privateGameStategs=GameState.Start; privateMap[]oMap=null; privateLineManager[]LM=null; privateScreenCursorcursor=null; privateGameOption.Optionsoptions=newGameOption.Options(); privateScreenObjectSO=null; privateBombPointbp1=newBombPoint(); privateBombPointbp2=newBombPoint(); privateSoundPlayListspl=newSoundPlayList(); privatestringappPath=""; privateSoundPlayerspBg; privateSoundPlayerspBomb; privateSoundPlayerspEarse; privateSoundPlayerspRefresh; privateSoundPlayerspSelect; privateSoundPlayerspHint; privateint[,]L=newint[3,3]{{28,22,16},{34,28,22},{39,34,28}}; privateTimerSplashTimer; privateGameLoadingGL=null; privateenumGameState { Start, Play, End, Win } publicGameMain(GameLoadinggameLoading) { InitializeComponent(); this.GL=gameLoading; } protectedoverridevoidDispose(booldisposing) { if(disposing) { if(components!=null) { components.Dispose(); } } base.Dispose(disposing); } #regionWindows窗體設(shè)計(jì)器生成的代碼 privatevoidInitializeComponent() { ponents=newContainer(); this.btnReset=newButton(); this.btnInfo=newButton(); this.AutoClear=newCheckBox(); this.lineTimer=newTimer(ponents); this.btnRePlay=newButton(); this.label1=newLabel(); this.lbP=newLabel(); this.lbInfoCount=newLabel(); this.label3=newLabel(); this.btnExit=newButton(); this.pBar=newProgressBar(); this.lbTimeOut=newLabel(); this.timeOutTimer=newTimer(ponents); this.pictureBox1=newPictureBox(); this.lbCaption=newLabel(); this.AutoReset=newCheckBox(); this.btnAbout=newButton(); this.btnConfig=newButton(); this.SplashTimer=newTimer(ponents); this.SuspendLayout(); this.btnReset.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnReset.Location=newPoint(672,100); this.btnReset.Name="btnReset"; this.btnReset.TabIndex=1; this.btnReset.Text="重排"; this.btnReset.Click+=newEventHandler(this.btnReset_Click); this.btnInfo.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnInfo.Location=newPoint(672,68); this.btnInfo.Name="btnInfo"; this.btnInfo.TabIndex=2; this.btnInfo.Text="提示"; this.btnInfo.Click+=newEventHandler(this.btnInfo_Click); this.AutoClear.ForeColor=Color.Goldenrod; this.AutoClear.Location=newPoint(672,136); this.AutoClear.Name="AutoClear"; this.AutoClear.Size=newSize(80,24); this.AutoClear.TabIndex=0; this.AutoClear.Text="自動(dòng)清除"; this.lineTimer.Interval=200; this.lineTimer.Tick+=newEventHandler(this.lineTimer_Tick); this.btnRePlay.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnRePlay.Location=newPoint(672,36); this.btnRePlay.Name="btnRePlay"; this.btnRePlay.TabIndex=3; this.btnRePlay.Text="新局"; this.btnRePlay.Click+=newEventHandler(this.btnRePlay_Click); this.label1.AutoSize=true; this.label1.ForeColor=Color.Goldenrod; this.label1.Location=newPoint(672,204); this.label1.Name="label1"; this.label1.Size=newSize(35,17); this.label1.TabIndex=6; this.label1.Text="得分:"; this.lbP.AutoSize=true; this.lbP.ForeColor=Color.Red; this.lbP.Location=newPoint(672,228); this.lbP.Name="lbP"; this.lbP.Size=newSize(11,17); this.lbP.TabIndex=7; this.lbP.Text="0"; this.lbInfoCount.AutoSize=true; this.lbInfoCount.ForeColor=Color.Red; this.lbInfoCount.Location=newPoint(672,280); this.lbInfoCount.Name="lbInfoCount"; this.lbInfoCount.Size=newSize(11,17); this.lbInfoCount.TabIndex=9; this.lbInfoCount.Text="0"; this.label3.AutoSize=true; this.label3.ForeColor=Color.Goldenrod; this.label3.Location=newPoint(672,256); this.label3.Name="label3"; this.label3.Size=newSize(60,17); this.label3.TabIndex=8; this.label3.Text="提示次數(shù):"; this.btnExit.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnExit.Location=newPoint(672,376); this.btnExit.Name="btnExit"; this.btnExit.TabIndex=10; this.btnExit.Text="退出"; this.btnExit.Click+=newEventHandler(this.btnExit_Click); this.pBar.Location=newPoint(112,400); this.pBar.Name="pBar"; this.pBar.Size=newSize(416,23); this.pBar.TabIndex=11; this.pBar.Value=100; this.lbTimeOut.AutoSize=true; this.lbTimeOut.ForeColor=Color.Goldenrod; this.lbTimeOut.Location=newPoint(8,404); this.lbTimeOut.Name="lbTimeOut"; this.lbTimeOut.Size=newSize(97,17); this.lbTimeOut.TabIndex=12; this.lbTimeOut.Text="剩余時(shí)間(60秒):"; this.timeOutTimer.Interval=1000; this.timeOutTimer.Tick+=newEventHandler(this.timeOutTimer_Tick); this.pictureBox1.Location=newPoint(8,40); this.pictureBox1.Name="pictureBox1"; this.pictureBox1.Size=newSize(630,330); this.pictureBox1.SizeMode=PictureBoxSizeMode.StretchImage; this.pictureBox1.TabIndex=13; this.pictureBox1.TabStop=false; this.lbCaption.AutoSize=true; this.lbCaption.ForeColor=Color.Lime; this.lbCaption.Location=newPoint(8,8); this.lbCaption.Name="lbCaption"; this.lbCaption.Size=newSize(116,17); this.lbCaption.TabIndex=14; this.lbCaption.Text="連連看趕快開始吧."; this.AutoReset.ForeColor=Color.Goldenrod; this.AutoReset.Location=newPoint(672,168); this.AutoReset.Name="AutoReset"; this.AutoReset.Size=newSize(80,24); this.AutoReset.TabIndex=15; this.AutoReset.Text="自動(dòng)重排"; this.AutoReset.Visible=false; this.btnAbout.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnAbout.Location=newPoint(672,344); this.btnAbout.Name="btnAbout"; this.btnAbout.TabIndex=16; this.btnAbout.Text="關(guān)于"; this.btnAbout.Click+=newEventHandler(this.btnAbout_Click); this.btnConfig.ForeColor=Color.FromArgb(((Byte)(192)),((Byte)(255)),((Byte)(255))); this.btnConfig.Location=newPoint(672,312); this.btnConfig.Name="btnConfig"; this.btnConfig.TabIndex=17; this.btnConfig.Text="配置"; this.btnConfig.Click+=newEventHandler(this.btnConfig_Click); this.SplashTimer.Enabled=true; this.SplashTimer.Interval=500; this.SplashTimer.Tick+=newEventHandler(this.SplashTimer_Tick); this.AutoScaleBaseSize=newSize(6,14); this.BackColor=Color.Black; this.ClientSize=newSize(758,431); this.Controls.Add(this.btnConfig); this.Controls.Add(this.btnAbout); this.Controls.Add(this.AutoReset); this.Controls.Add(this.lbCaption); this.Controls.Add(this.lbTimeOut); this.Controls.Add(this.lbInfoCount); this.Controls.Add(this.label3); this.Controls.Add(this.lbP); this.Controls.Add(this.label1); this.Controls.Add(this.pBar); this.Controls.Add(this.btnExit); this.Controls.Add(this.btnRePlay); this.Controls.Add(this.AutoClear); this.Controls.Add(this.btnInfo); this.Controls.Add(this.btnReset); this.Controls.Add(this.pictureBox1); this.Cursor=Cursors.Default; this.FormBorderStyle=FormBorderStyle.FixedDialog; this.MaximizeBox=false; this.Name="GameMain"; this.StartPosition=FormStartPosition.CenterScreen; this.Text="GameMain"; this.Load+=newEventHandler(this.GameMain_Load); this.MouseUp+=newMouseEventHandler(this.GameMain_MouseUp); this.Paint+=newPaintEventHandler(this.GameMain_Paint); this.MouseMove+=newMouseEventHandler(this.GameMain_MouseMove); this.ResumeLayout(false); } #endregion ///<summary> ///應(yīng)用程序的主入口點(diǎn)。 ///</summary> [STAThread] privatestaticvoidMain() { GameLoadingGL=newGameLoading(); GL.Show(); Application.Run(newGameMain(GL)); } privatevoidGameMain_Load(objectsender,EventArgse) { appPath=Application.ExecutablePath.Substring(0,Application.ExecutablePath.LastIndexOf("\\")); this.Hide(); GL.Refresh(); GL.UpdateLoadingInfo("正在初始化地圖..."); oMap=newMap[3]; GL.UpdateLoadingInfo("初始化地圖...完成,正在初始化連線管理..."); LM=newLineManager[3]; GL.UpdateLoadingInfo("初始化連線管理...完成,正在初始化光標(biāo)和配置檔案..."); cursor=newScreenCursor(); GameOptiongo=newGameOption(this.spl); options=go.ReadOption(); go.Dispose(); GL.UpdateLoadingInfo("初始化光標(biāo)和配置檔案...完成,正在初始化素材數(shù)據(jù)..."); SO=newScreenObject(); GL.UpdateLoadingInfo("初始化素材數(shù)據(jù)...完成,正在分配元素..."); oMap[0]=newMap(SO,39,0,0); oMap[1]=newMap(SO,34,0,0); oMap[2]=newMap(SO,28,0,0); GL.UpdateLoadingInfo("分配元素...完成,正在計(jì)算路徑..."); LM[0]=newLineManager(oMap[0]); LM[1]=newLineManager(oMap[1]); LM[2]=newLineManager(oMap[2]); SD=newScreenDraw(this.CreateGraphics(),Map.TileRowCount*Map.TileWidth,Map.TileColCount*Map.TileHeight); search_p1=newLine(); search_p2=newLine(); this.Text="連連看第一版byS.F."; try { this.pictureBox1.Image=Image.FromFile(appPath+"\\Images\\WelCome.jpg"); } catch { MessageBox.Show("缺少資源目錄!!","請(qǐng)到安裝目錄內(nèi)運(yùn)行!",MessageBoxButtons.OK,MessageBoxIcon.Information); this.Close(); } GL.UpdateLoadingInfo("計(jì)算路徑...完成,正在初始化聲音檔案..."); // spl.Add(@".\Sounds\bg-01.mid"); // spl.Add(@".\Sounds\bg-02.mid"); // spl.Add(@".\Sounds\bg-03.mid"); // spl.Add(@".\Sounds\bg-04.mp3"); spBg=newSoundPlayer(spl.CurrentMusic(),"bg"); GL.UpdateLoadingInfo("初始化背景音樂完成..."); spBomb=newSoundPlayer(appPath+@"\Sounds\bomb.wav","bomb"); GL.UpdateLoadingInfo("初始化爆炸音效完成..."); spEarse=newSoundPlayer(appPath+@"\Sounds\Earse.wav","earse"); GL.UpdateLoadingInfo("初始化連線音效完成..."); spRefresh=newSoundPlayer(appPath+@"\Sounds\refresh.wav","refresh"); GL.UpdateLoadingInfo("初始化刷新音效完成..."); spSelect=newSoundPlayer(appPath+@"\Sounds\select.wav","select"); GL.UpdateLoadingInfo("初始化選擇音效完成..."); spHint=newSoundPlayer(appPath+@"\Sounds\hint.wav","hint"); GL.UpdateLoadingInfo("游戲初始化完畢!"); //GL.Close(); //GL.Dispose(); //GL=null; } privatevoidInitGame() { //3分鐘 pBar.Maximum=GameTimeSec; pBar.Minimum=0; pBar.Value=pBar.Maximum; this.InfoCount=5; this.PointCount=0; if(File.Exists(appPath+"\\chinasf")) { this.InfoCount=5000; } pictureBox1.Hide(); lbCaption.Hide(); for(inti=0;i<oMap.Length;i++) { oMap[i].Level=L[options.Level-1,i]; } if(gs==GameState.End) { foreach(MapminoMap) { m.ResetMap(); m.RandomRefresh(); } UpdateFrame(); } gs=GameState.Play; this.timeOutTimer.Enabled=true; if(options.PlayMusic) { if(!spBg.IsPlaying) { spBg.FileName=spl.CurrentMusic(); spBg.PlaySound(); } } else { spBg.StopSound(); } if(GL!=null) { GL.Close(); GL.Dispose(); GL=null; } } privatevoidEndGame() { gs=GameState.End; this.timeOutTimer.Enabled=false; SD.Fill(Color.Black); SD.Flip(0,0); pBar.Maximum=GameTimeSec; pBar.Minimum=0; pBar.Value=pBar.Maximum; pictureBox1.Show(); lbCaption.Show(); spBg.StopSound(); } privatevoidWinGame() { gs=GameState.Win; EndGame(); } privatevoidGameMain_MouseUp(objectsender,MouseEventArgse) { if(gs!=GameState.Play)return; MapTile[]oMapTile=newMapTile[3]; for(inti=oMap.Length-1;i>=0;i--) { if(oMap[i].GetCount()>0) { oMapTile[i]=oMap[i].TranPointToMapTile(e.X,e.Y); if(oMapTile[i]!=null) { if(oMapTile[i].XIndex==0||oMapTile[i].YIndex==0||oMapTile[i].XIndex==Map.TileRowCount-1||oMapTile[i].YIndex==Map.TileColCount-1||oMapTile[i].ID==0) { return; } else { if(oMap[oMap.Length-1].GetCount()>0) { if(i<oMap.Length-1)break; } Graphicsg=this.CreateGraphics(); g.DrawRectangle(newPen(Color.Red),oMapTile[i].X,oMapTile[i].Y,oMapTile[i].Width,oMapTile[i].Height); LM[i].Add(oMapTile[i].XIndex,oMapTile[i].YIndex,oMapTile[i].ID); cursor.DrawCursor(g); if(this.options.PlaySound) spSelect.PlaySound(); isSearch=false; if(LM[i].CanStartLink()) { UpdateFrame(); } break; } } } } } privatevoidGameMain_Paint(objectsender,PaintEventArgse) { if(gs==GameState.Play)UpdateFrame(); } privateintShowLineAndClear() { ArrayListfindPathPoints=null; inttrunCount=0; bp1.SetEmpty(); bp2.SetEmpty(); for(inti=oMap.Length-1;i>=0;i--) { if(LM[i].TestLink(outfindPathPoints,outtrunCount)) { oMap[i].DrawPathPoints(SD.Surface(),findPathPoints); /*繪制爆炸效果*/ bp1.CurrentMap=oMap[i]; bp2.CurrentMap=oMap[i]; bp1.CurrentPoint=newPoint(LM[i].Items(LM[i].Count-1).X,LM[i].Items(LM[i].Count-1).Y); bp2.CurrentPoint=newPoint(LM[i].Items(LM[i].Count-2).X,LM[i].Items(LM[i].Count-2).Y); bp1.CurrentSurface=SD.Image(); bp2.CurrentSurface=SD.Image(); MapTileoMapTile1=bp1.CurrentMap.MapView[bp1.CurrentPoint.X,bp1.CurrentPoint.Y]; MapTileoMapTile2=bp2.CurrentMap.MapView[bp2.CurrentPoint.X,bp2.CurrentPoint.Y]; if(oMapTile1!=null) { Bitmapb1=bp1.CurrentMap.DrawBombEff(bp1.CurrentSurface,5,oMapTile1); SD.Surface().DrawImage((Image)b1,bp1.TransOffsetX(oMapTile1.X),bp1.TransOffsetY(oMapTile1.Y)); } if(oMapTile2!=null) { Bitmapb2=bp2.CurrentMap.DrawBombEff(bp2.CurrentSurface,5,oMapTile2); SD.Surface().DrawImage((Image)b2,bp2.TransOffsetX(oMapTile2.X),bp2.TransOffsetY(oMapTile2.Y)); } bp1.SetEmpty(); bp2.SetEmpty(); /*爆炸效果完畢*/ oMap[i].DestroyObject(LM[i].Items(LM[i].Count-1).X,LM[i].Items(LM[i].Count-1).Y); oMap[i].DestroyObject(LM[i].Items(LM[i].Count-2).X,LM[i].Items(LM[i].Count-2).Y); lineTimer.Enabled=true; LM[i].Clear(); returntrunCount+1; } } return0; } privatevoidUpdateFrame() { UpdateFrame(true); } privatevoidUpdateFrame(boolIsFlip) { if(gs==GameState.Play) { if(!this.Visible)return; SD.Fill(Color.Black); for(inti=0;i<oMap.Length;i++) { if(oMap[i].GetCount()!=0) { if(i<2) { if(oMap[i+1].GetCount()!=0) { if(i==0) { oMap[i].Draw(SD.Surface(),true,1); } else { oMap[i].Draw(SD.Surface(),true,2); } } else { oMap[i].Draw(SD.Surface(),false,1); } } else { oMap[i].Draw(SD.Surface(),false,1); } } if(LM[i].CanStartLink()) { if(isSearch) { //只是提示 MapTileMT1=oMap[i].GetMapTile(search_p1.X,search_p1.Y); MapTileMT2=oMap[i].GetMapTile(search_p2.X,search_p2.Y); SD.Surface().DrawRectangle(newPen(Color.Red,2F),MT1.X,MT1.Y,MT1.Width-1,MT1.Height-1); SD.Surface().DrawRectangle(newPen(Color.Red,2F),MT2.X,MT2.Y,MT2.Width-1,MT2.Height-1); cursor.DrawCursor(SD.Surface(),newPoint(MT1.X+15,MT1.Y+15)); cursor.DrawCursor(SD.Surface(),newPoint(MT2.X+15,MT2.Y+15)); } if(AutoClear.Checked&&isSearch) { intt=ShowLineAndClear(); if(isSearch) { if(t!=0) { PointCount-=t*100; if(this.options.PlaySound) spBomb.PlaySound(); } } else { if(t!=0) { PointCount+=t*100; if(this.options.PlaySound) spBomb.PlaySound(); } } isSearch=false; } elseif(!isSearch) { intt=ShowLineAndClear(); if(t!=0) { PointCount+=t*100; pBar.Value=pBar.Value+Math.Min(pBar.Maximum-pBar.Value,6); if(this.options.PlaySound) spEarse.PlaySound(); } } lbP.Text=PointCount.ToString(); } } if(IsFlip) { SD.Flip(0,0); } lbInfoCount.Text=InfoCount.ToString(); inttotalObjectCount=0; foreach(MapminoMap) { totalObjectCount+=m.GetCount(); } if(totalObjectCount==0) { EndGame(); MessageBox.Show("恭喜,已過關(guān)!","系統(tǒng)提示",MessageBoxButtons.OK,MessageBoxIcon.Information); } if(options.PlayMusic&&gs==GameState.Play) { if(!spBg.IsPlaying) { spBg.FileName=spl.CurrentMusic(); spBg.PlaySound(); } } else { spBg.StopSound(); } } } privatevoidlineTimer_Tick(objectsender,EventArgse) { if(gs!=GameState.Play)return; lineTimer.Enabled=false; UpdateFrame(); } privatevoidbtnInfo_Click(objectsender,EventArgse) { if(gs!=GameState.Play)return; if(InfoCount>0) { InfoCount--; search_p1.X=-1; search_p2.X=-1; search_p1.Y=-1; search_p2.Y=-1; if(oMap[2].GetCount()!=0) isSearch=LM[2].SearchLine(refsearch_p1,refsearch_p2); elseif(oMap[1].GetCount()!=0) isSearch=LM[1].SearchLine(refsearch_p1,refsearch_p2); else isSearch=LM[0].SearchLine(refsearch_p1,refsearch_p2); UpdateFrame(); } } privatevoidbtnReset_Click(objectsender,EventArgse) { if(gs!=GameState.Play)return; if(this.options.PlaySound) spRefresh.PlaySound(); foreach(MapminoMap) { m.RandomRefresh(); } UpdateFrame(); } privatevoidbtnRePlay_Click(objectsender,EventArgse) { if(gs==GameState.Play) { if(MessageBox.Show("目前正在游戲,打算開新局嗎?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information)==DialogResult.Yes) { this.EndGame(); } else { return; } } this.InitGame(); foreach(MapminoMap) { m.ResetMap(); m.RandomRefresh(); } PointCount=0; UpdateFrame(); } privatevoidbtnExit_Click(objectsender,EventArgse) { this.EndGame(); this.Close(); } privatevoidtimeOutTimer_Tick(objectsender,EventArgse) { if(pBar.Value>0) { pBar.Value=pBar.Value-1; lbTimeOut.Text=String.Format
溫馨提示
- 1. 本站所有資源如無(wú)特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 【假期提升】 五升六語(yǔ)文暑假作業(yè)(四)-人教部編版(含答案含解析)
- 音樂角色測(cè)試試題及答案
- 2019-2025年軍隊(duì)文職人員招聘之軍隊(duì)文職公共科目能力檢測(cè)試卷A卷附答案
- 醫(yī)療服務(wù)基礎(chǔ)面試題及答案
- 配合老師教學(xué)的合同(2篇)
- 2025年度施工員資格考試全真模擬考試試題及答案(共三套)
- 健康衛(wèi)生知識(shí)培訓(xùn)課件
- 年度目標(biāo)達(dá)成工作計(jì)劃與目標(biāo)分解
- 私人導(dǎo)游旅游服務(wù)安全須知
- 成長(zhǎng)中的兒童文學(xué)經(jīng)典作品解讀
- (二調(diào))武漢市2025屆高中畢業(yè)生二月調(diào)研考試 英語(yǔ)試卷(含標(biāo)準(zhǔn)答案)+聽力音頻
- 中學(xué)家長(zhǎng)學(xué)校工作方案(10篇)
- 高考地理二輪復(fù)習(xí)【知識(shí)精研】大氣運(yùn)動(dòng)規(guī)律-大氣受熱過程與氣溫
- 日內(nèi)交易策略(TBQ版)
- 煤礦常用機(jī)電設(shè)備的日常管理-培訓(xùn)課件
- 2025年新執(zhí)業(yè)醫(yī)師定期考核真題庫(kù)附參考答案
- 【公開課】同一直線上二力的合成+課件+2024-2025學(xué)年+人教版(2024)初中物理八年級(jí)下冊(cè)+
- (正式版)HGT 22820-2024 化工安全儀表系統(tǒng)工程設(shè)計(jì)規(guī)范
- 脊髓壓迫癥A吳紹勇
- FMEA第五版表格(實(shí)例)
- 百斯巴特扒胎機(jī)MS63
評(píng)論
0/150
提交評(píng)論