資源簡介
俄羅斯方塊c#代碼,用vs2010或者vs2012都能打開

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?俄羅斯方塊.Controller;
using?俄羅斯方塊.Entities;
namespace?俄羅斯方塊
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????????//關閉跨前程訪問檢查
????????????Label.CheckForIllegalCrossThreadCalls?=?false;
????????????
????????}
????????GameController?controller;
????????Ground?ground;
????????private?void?btnStart_Click(object?sender?EventArgs?e)
????????{
????????????if?(btnStart.Text?==?“開始游戲“)
????????????{
????????????????Util.Commonhelp.GameSudu?=?500;
????????????????fenshu?=0;
????????????????labJiFen.Text?=?““;
????????????????btnStart.Text?=?“暫停“;
????????????????ground?=?new?Ground(XianShiFenShu);
????????????????labGameOver.Text?=?“游戲開始“;
????????????????Graphics?g?=?Graphics.FromHwnd(this.gamePanel.Handle);//聲明一個畫家對象
????????????????controller?=?new?GameController(g?GameOver?ground);
????????????????controller.NewGame();
????????????????
????????????????
????????????}
????????????else?if?(btnStart.Text?==?“暫停“)
????????????{
????????????????btnStart.Text?=?“繼續“;
????????????????controller.StopThread();
????????????}
????????????else?if?(btnStart.Text?==?“繼續“)
????????????{
????????????????btnStart.Text?=?“暫停“;
????????????????controller.GoOnThread();
????????????}
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????Util.Commonhelp.initialise(this.gamePanel.Width?this.gamePanel.Height);
????????????new?Ground().InitBlocks();
????????}
????????private?void?GameOver()
????????{
????????????controller.StopThread();
????????????labGameOver.Text?=?“游戲結束“;
????????????btnStart.Text?=?“開始游戲“;
????????}
????????protected?override?bool?ProcessDialogKey(Keys?keyData)
????????{
????????????if?(btnStart.Text?==?“暫停“)
????????????{
????????????????controller.ProcessDialogKey(keyData);
????????????????return?base.ProcessDialogKey(keyData);
????????????}
????????????return?false;
????????}
????????int?fenshu?=?0;
????????int?nanDu?=?100;
????????private?void?XianShiFenShu()
????????{
????????????fenshu?+=?11;
????????????labJiFen.Text?=?“總分:“?+?fenshu;
????????????
????????????if?(fenshu?>=?nanDu)
????????????{
????????????????nanDu?=?nanDu?*?2;
????????????????Util.Commonhelp.GameSudu?-=?50;
????????????}
???????????
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-05-22?01:10??俄羅斯方塊\
?????目錄???????????0??2014-05-25?11:23??俄羅斯方塊\俄羅斯方塊\
?????文件?????????187??2014-05-22?01:09??俄羅斯方塊\俄羅斯方塊\App.config
?????文件????????5043??2014-05-26?19:26??俄羅斯方塊\俄羅斯方塊\ClassDiagram1.cd
?????目錄???????????0??2014-05-24?15:04??俄羅斯方塊\俄羅斯方塊\Controller\
?????文件????????7390??2014-05-28?11:54??俄羅斯方塊\俄羅斯方塊\Controller\GameController.cs
?????目錄???????????0??2014-05-27?12:35??俄羅斯方塊\俄羅斯方塊\Entities\
?????文件????????1682??2014-05-23?21:20??俄羅斯方塊\俄羅斯方塊\Entities\Block.cs
?????文件?????????505??2014-05-23?15:46??俄羅斯方塊\俄羅斯方塊\Entities\BlockTypeEnum.cs
?????文件?????????218??2014-05-27?12:36??俄羅斯方塊\俄羅斯方塊\Entities\FenShuDelegate.cs
?????文件?????????214??2014-05-25?22:23??俄羅斯方塊\俄羅斯方塊\Entities\GameOverDelegate.cs
?????文件????????9595??2014-05-27?20:10??俄羅斯方塊\俄羅斯方塊\Entities\Ground.cs
?????文件????????3117??2014-05-26?18:43??俄羅斯方塊\俄羅斯方塊\Entities\LLeftShape.cs
?????文件????????3271??2014-05-27?21:45??俄羅斯方塊\俄羅斯方塊\Entities\LRightShape.cs
?????文件????????3227??2014-05-27?21:45??俄羅斯方塊\俄羅斯方塊\Entities\LineShape.cs
?????文件?????????946??2014-05-25?16:25??俄羅斯方塊\俄羅斯方塊\Entities\Position.cs
?????文件????????6463??2014-05-27?02:57??俄羅斯方塊\俄羅斯方塊\Entities\Shape.cs
?????文件?????????279??2014-05-26?21:20??俄羅斯方塊\俄羅斯方塊\Entities\ShapeDirection.cs
?????文件????????1134??2014-05-24?16:02??俄羅斯方塊\俄羅斯方塊\Entities\ShapeFactory.cs
?????文件?????????361??2014-05-24?15:42??俄羅斯方塊\俄羅斯方塊\Entities\ShapeTypeEnum.cs
?????文件????????3062??2014-05-26?17:27??俄羅斯方塊\俄羅斯方塊\Entities\ShapeUnit.cs
?????文件?????????971??2014-05-27?21:45??俄羅斯方塊\俄羅斯方塊\Entities\SquShape.cs
?????文件????????3076??2014-05-26?23:04??俄羅斯方塊\俄羅斯方塊\Entities\TShape.cs
?????文件????????3104??2014-05-26?22:54??俄羅斯方塊\俄羅斯方塊\Entities\ZLeftShape.cs
?????文件????????3104??2014-05-26?22:56??俄羅斯方塊\俄羅斯方塊\Entities\ZRightShape.cs
?????文件????????4154??2014-06-07?22:26??俄羅斯方塊\俄羅斯方塊\Form1.Designer.cs
?????文件????????2739??2014-06-07?23:21??俄羅斯方塊\俄羅斯方塊\Form1.cs
?????文件????????5817??2014-06-07?22:26??俄羅斯方塊\俄羅斯方塊\Form1.resx
?????目錄???????????0??2014-05-25?11:23??俄羅斯方塊\俄羅斯方塊\Interface\
?????文件?????????333??2014-05-26?13:49??俄羅斯方塊\俄羅斯方塊\Interface\IShapeMoveable.cs
?????文件?????????527??2014-05-22?01:10??俄羅斯方塊\俄羅斯方塊\Program.cs
............此處省略35個文件信息
- 上一篇:農業產品溯源系統
- 下一篇:QC1314留言板.zip
評論
共有 條評論