91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

C#或U3D初學(xué)者必做游戲。 該項(xiàng)目由vs2015編譯,C#開發(fā),已測試可以編譯運(yùn)行。 游戲功能:單人游戲、雙人游戲,有背景音樂和提示音,可改變地圖大小,游戲速度。 附帶游戲說明及視頻。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Media;
using?System.Reflection;
using?System.Text;
using?System.Threading;
using?System.Threading.Tasks;
using?System.IO;

namespace?Snake
{
????///?
????///?二維坐標(biāo)
????///?

????class?Vector2
????{
????????int?x;
????????int?y;
????????public?Vector2(int?x?int?y)
????????{
????????????this.x?=?x;
????????????this.y?=?y;
????????}

????????public?int?X
????????{
????????????get
????????????{
????????????????return?x;
????????????}
????????}

????????public?int?Y
????????{
????????????get
????????????{
????????????????return?y;
????????????}
????????}
????}

????///?
????///?配置信息
????///?

????class?Map
????{
????????public?static?int?X?=?20;
????????public?static?int?Y?=?20;
????}
????///?
????///?配置信息
????///?

????class?Option
????{
????????public?static?SoundPlayer?s?=?new?SoundPlayer(Directory.GetCurrentDirectory()?+?@“\snake.wav“);
????????public?static?bool?music?=?true;
????????public?static?bool?sound?=?true;
????????public?static?int?speed?=?500;
????}

????///?
????///?蛇頭方向枚舉
????///?

????enum?SnakeDirect
????{
????????up?down?left?right
????}

????///?
????///?蛇類
????///?

????class?SnakeAll
????{
????????int?score;
????????bool?isDead;
????????ConsoleColor?color;
????????Vector2?head?tail?node?judge;
????????SnakeDirect?sd;
????????Queue?sall?=?new?Queue();

????????//構(gòu)造函數(shù)——初始化
????????public?SnakeAll()
????????{
????????????score?=?0;
????????????isDead?=?false;
????????????color?=?ConsoleColor.Red;
????????????//初始方向往上
????????????sd?=?SnakeDirect.down;
????????????node?=?new?Vector2(0?0);
????????????sall.Enqueue(node);
????????????node?=?new?Vector2(0?1);
????????????sall.Enqueue(node);
????????????//初始蛇頭蛇尾
????????????//tail?=?sall.Peek();
????????????head?=?node;
????????}
????????public?SnakeAll(int?no)
????????{
????????????score?=?0;
????????????isDead?=?false;
????????????color?=?ConsoleColor.Blue;
????????????//初始方向往上
????????????sd?=?SnakeDirect.up;
????????????node?=?new?Vector2(Map.X-1?Map.Y-1);
????????????sall.Enqueue(node);
????????????node?=?new?Vector2(Map.X-1?Map.Y-1-1);
????????????sall.Enqueue(node);
????????????//初始蛇頭蛇尾
????????????//tail?=?sall.Peek();
????????????head?=?node;
????????}

????????//蛇頭方向改變
????????public?void?DirectChange(ConsoleKeyInfo?info)
????????{
????????????if?(sd?==?SnakeDirect.up)
????????????{
????????????????if?(info.Key?!=?ConsoleKey.UpArrow?||?info.Key?!=?ConsoleKey.DownArrow?||?info.Key?!=?ConsoleKey.W?||?info.Key?!=?ConsoleKey.S)
????????????????{
????????????????????switch?(info.Key)
????????????????????{
????????????????????????case?ConsoleKey.A:
????????????????????????case?ConsoleKey.LeftArrow:
????????????????????????????sd?=?SnakeDirect.left;
????????????????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-06-02?18:19??Snake\
?????文件????93214958??2018-06-02?19:05??Snake.mp4
?????文件?????????189??2018-05-30?08:37??Snake\App.config
?????目錄???????????0??2018-06-02?18:19??Snake\bin\
?????目錄???????????0??2018-06-02?18:19??Snake\bin\Debug\
?????文件???????20480??2018-06-02?18:18??Snake\bin\Debug\Snake.exe
?????文件?????????189??2018-05-30?08:37??Snake\bin\Debug\Snake.exe.config
?????文件???????36352??2018-06-02?18:18??Snake\bin\Debug\Snake.pdb
?????文件???????22696??2018-06-02?18:18??Snake\bin\Debug\Snake.vshost.exe
?????文件?????????189??2018-05-30?08:37??Snake\bin\Debug\Snake.vshost.exe.config
?????文件?????????490??2013-03-18?17:00??Snake\bin\Debug\Snake.vshost.exe.manifest
?????文件?????7835692??2018-06-01?16:23??Snake\bin\Debug\Snake.wav
?????目錄???????????0??2018-06-02?20:00??Snake\bin\Release\
?????目錄???????????0??2018-06-02?18:19??Snake\obj\
?????目錄???????????0??2018-06-02?18:19??Snake\obj\Debug\
?????文件?????????725??2018-06-01?15:04??Snake\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????6758??2018-06-02?15:30??Snake\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件?????????430??2018-06-02?18:18??Snake\obj\Debug\Snake.csproj.FileListAbsolute.txt
?????文件????????1922??2018-05-30?13:45??Snake\obj\Debug\Snake.csprojResolveAssemblyReference.cache
?????文件???????20480??2018-06-02?18:18??Snake\obj\Debug\Snake.exe
?????文件???????36352??2018-06-02?18:18??Snake\obj\Debug\Snake.pdb
?????文件???????????0??2018-05-30?08:37??Snake\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件???????????0??2018-05-30?08:37??Snake\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件???????????0??2018-05-30?08:37??Snake\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????目錄???????????0??2018-06-02?18:19??Snake\obj\Debug\TempPE\
?????文件????????3072??2018-06-01?15:34??Snake\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件???????49080??2018-06-04?15:26??Snake\Program.cs
?????目錄???????????0??2018-06-02?18:19??Snake\Properties\
?????文件????????1336??2018-05-30?08:37??Snake\Properties\AssemblyInfo.cs
?????文件????????2670??2018-06-01?15:34??Snake\Snake.csproj
?????文件?????????226??2018-06-01?15:43??Snake\Snake.csproj.user
............此處省略1個(gè)文件信息

評論

共有 條評論