• 大小: 146KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-03
  • 语言: C#
  • 标签: C#RPG游戏  C#练习  

资源简介

闲来无事写的一个C#控制台应用程序,本RPG游戏有多种角色属性供你选择,拥有技能,商店,丰富的战斗系统和升级功能。学习C#的朋友可以看一看,对面向对象很有帮助。使用了封装 继承和多态思想。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

namespace RPG_Fairyland_MiracleTour
{
    class GamePackage
    {
        //玩家的背包列表
        private static Dictionary dicPackageGoods = new Dictionary();
        public static Dictionary DicPackageGoods1
        {
            get
            {
                return dicPackageGoods;
            }

            set
            {
                dicPackageGoods = value;
            }
        }
        /// 
        /// 给玩家背包付物品初值
        /// 

        public GamePackage()
        {
            dicPackageGoods[“能量甘饮“] = 1;
            dicPackageGoods[“止痛药“] = 1;

        }
        /// 
        /// 用来输出玩家背包内物品
        /// 

        public void PackageToUp()
        {
            Console.WriteLine(“\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *“);
            Console.WriteLine(“\n\t名称“);
            foreach (var packageGoods in dicPackageGoods)
            {
                Thread.Sleep(500);
                Console.WriteLine(“\n\t“ + packageGoods.Key+“       “+ packageGoods.Value+“个“);
            }
            Console.WriteLine(“\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *“);
            Program.GameChoice();
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\.vs\
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\.vs\RPG_Fairyland_MiracleTour\
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\.vs\RPG_Fairyland_MiracleTour\v14\
     文件       67072  2018-07-09 11:27  RPG_Fairyland_MiracleTour\.vs\RPG_Fairyland_MiracleTour\v14\.suo
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\
     文件         189  2018-05-28 15:05  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\App.config
     文件        1558  2018-05-30 03:30  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\GamePackage.cs
     文件       20831  2018-06-01 11:16  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\GameRoles.cs
     文件       38932  2018-06-01 11:16  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\Program.cs
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\Properties\
     文件        1376  2018-05-28 15:05  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\Properties\AssemblyInfo.cs
     文件        2907  2018-05-30 01:37  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour.csproj
     文件       22667  2018-06-01 09:55  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\Skill.cs
     文件        2340  2018-05-31 16:10  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\Weapon.cs
     文件       35197  2018-05-31 17:00  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\WeaponStore.cs
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\
     文件       36864  2018-07-09 11:04  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.exe
     文件         189  2018-05-28 15:05  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.exe.config
     文件       71168  2018-07-09 11:04  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.pdb
     文件       22696  2018-07-09 11:04  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.vshost.exe
     文件         189  2018-05-28 15:05  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.vshost.exe.config
     文件         490  2018-04-12 07:35  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug\RPG_Fairyland_MiracleTour.vshost.exe.manifest
     文件       38027  2018-05-30 12:07  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\bin\Debug.rar
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\
     目录           0  2018-06-15 04:22  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\Debug\
     文件        6894  2018-06-22 10:42  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        2340  2018-07-09 11:04  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\Debug\RPG_Fairyland_MiracleTour.csproj.FileListAbsolute.txt
     文件        1922  2018-05-28 15:50  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\Debug\RPG_Fairyland_MiracleTour.csprojResolveAssemblyReference.cache
     文件       36864  2018-07-09 11:04  RPG_Fairyland_MiracleTour\RPG_Fairyland_MiracleTour\obj\Debug\RPG_Fairyland_MiracleTour.exe
............此处省略6个文件信息

评论

共有 条评论