資源簡介
這是本人研究生期間完成的一次設計模式大作業,有關于設計模式的課程結課作業,設計模式總共23種,在這里我運用了6種設計模式設計了一款游戲,運用了c#編程語言,壓縮包中含有項目的說明書,PPT,完整的源碼,還有類圖,幫助你理解,需要的話,可以參考一下
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?DragonQuest.General;
using?System.Drawing;
namespace?DragonQuest
{
????///?
????///?血條,生命值
????///?
????public?class?BloodBar?:?Element
????{
????????//血條的單位長度
????????private?const?int?WIDTH?=?1;
????????//血條的高度
????????private?const?int?HEIGHT?=?10;
????????private?int?allLife?nowLife;
????????public?int?X
????????{
????????????get?{?return?x;?}
????????????set?{?x?=?value;?}
????????}
????????public?int?Y
????????{
????????????get{return?y;}
????????????set?{?y?=?value;?}
????????}
????????public?BloodBar(int?x?int?y?int?allLife)
????????????:?base(x?y)
????????{
????????????this.allLife?=?allLife;
????????????this.nowLife?=?allLife;
????????}
????????public?int?NowLife
????????{
????????????get
????????????{
????????????????return?nowLife;
????????????}
????????????set?
????????????{?
????????????????nowLife?=?value;?
????????????}
????????}
????????public?override?void?Draw(System.Drawing.Graphics?g)
????????{
????????????g.DrawString(“Life:“?new?Font(“Arial“?10f)?new?SolidBrush(Color.Red)?x+50?y-20);
????????????g.DrawRectangle(new?Pen(Color.Red)?x+85?y-18?WIDTH?*?allLife?HEIGHT);
????????????g.FillRectangle(new?SolidBrush(Color.Red)?x+85?y-18?WIDTH?*?nowLife?HEIGHT);
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-05-24?16:54??鄧成梁-計算機技術1班-3170702010\
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\
?????文件????????1002??2013-12-13?19:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest.sln
?????文件???????77312??2011-12-19?21:23??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest.suo
?????文件??????182784??2014-01-01?21:12??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest.v12.suo
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\
?????文件??????269198??2013-07-18?19:34??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\i_comic.mp3
?????文件?????1446589??2013-07-18?19:34??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\r_bgm_01.mp3
?????文件?????1446589??2013-07-18?19:34??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\r_bgm_02.mp3
?????文件?????1159033??2013-07-18?19:34??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\u_bgm.mp3
?????文件????12778028??2013-12-31?10:01??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\backgroundMUsic\u_bgm.wav
?????文件???????83456??2014-01-01?21:27??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\DragonQuest.exe
?????文件??????132608??2014-01-01?21:27??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\DragonQuest.pdb
?????文件???????22704??2014-01-01?21:26??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\DragonQuest.vshost.exe
?????文件?????????490??2013-03-18?17:00??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\DragonQuest.vshost.exe.manifest
?????目錄???????????0??2014-03-20?20:30??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\
?????文件???????31747??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\background.png
?????文件???????35870??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\background1.png
?????文件?????????284??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_0.gif
?????文件?????????423??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_1.gif
?????文件?????????680??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_2.gif
?????文件?????????740??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_3.gif
?????文件?????????765??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_4.gif
?????文件?????????624??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_5.gif
?????文件?????????500??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_6.gif
?????文件?????????286??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_7.gif
?????文件?????????241??2011-06-16?22:57??鄧成梁-計算機技術1班-3170702010\DragonQuest\DragonQuest\DragonQuest\bin\Debug\images\blast1_8.gif
............此處省略135個文件信息
評論
共有 條評論