using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp3
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("月黑风高夜");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("路边的小草发出沙沙的声音");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("隐约在路的尽头有一个人影");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("走近一看,这人叫");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("请输入大侠的名称:");
Hero hrMan=new Hero();
hrMan.name=Console.ReadLine();
Console.WriteLine("原来你就是大名鼎鼎的:" + hrMan.name);
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
hrMan.gender = "男";
hrMan.age = 28;
hrMan.attack = 20;
hrMan.blood = 100;
hrMan.height = 175;
hrMan.skill1 = "飞檐走壁";
hrMan.skill1Num = 20;
hrMan.skill2 = "飞沙走石";
hrMan.skill2Num = 30;
Console.WriteLine("性别:"+hrMan.gender);
Console.WriteLine("年龄:"+hrMan.age);
Console.WriteLine("攻击力:"+hrMan.attack);
Console.WriteLine("血量:"+hrMan.blood);
Console.WriteLine("身高:"+hrMan.height);
Console.WriteLine("技能1:"+hrMan.skill1);
Console.WriteLine("技能1的伤害:"+hrMan.skill1Num);
Console.WriteLine("技能2:"+hrMan.skill2);
Console.WriteLine("技能2的伤害:"+hrMan.skill2Num);
Console.WriteLine("忽然,远处传来一声女子的惊呼");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("大侠赶忙跑了过去");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("只见一清秀的女子正被黑衣人袭击");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("大侠立刻伸出援手");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("边与黑衣人战斗,边询问女侠姓名");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("女侠声音有些虚弱,说道,小女子名叫:");
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
Console.WriteLine("请输入女侠姓名:");
Hero hrWoman= new Hero();
hrWoman.name=Console.ReadLine();
Console.WriteLine("原来女侠就是喜欢行侠仗义的:" + hrWoman.name);
Console.WriteLine("请按任意键继续...");
Console.ReadKey();
hrWoman.gender = "女";
hrWoman.age = 18;
hrWoman.attack = 20;
hrWoman.blood = 100;
hrWoman.height = 165;
hrWoman.skill1 = "凌波微步";
hrWoman.skill1Num = 20;
hrWoman.skill2 = "拂柳剑法";
hrWoman.skill2Num = 30;
Console.WriteLine("性别:" + hrWoman.gender);
Console.WriteLine("年龄:" + hrWoman.age);
Console.WriteLine("攻击力:" + hrWoman.attack);
Console.WriteLine("血量:" + hrWoman.blood);
Console.WriteLine("身高:" + hrWoman.height);
Console.WriteLine("技能1:" + hrWoman.skill1);
Console.WriteLine("技能1的伤害:" + hrWoman.skill1Num);
Console.WriteLine("技能2:" + hrWoman.skill2);
Console.WriteLine("技能2的伤害:" + hrWoman.skill2Num);
}
}
class Hero
{
public string name;
public string gender;
public int age;
public int attack;
public int blood;
public int height;
public string skill1;
public int skill1Num;
public string skill2;
public int skill2Num;
}
}
C#文字游戏
最新推荐文章于 2024-07-23 15:41:07 发布