Example #1
0
        /// <summary>
        /// 使用静态方法创建一个标准玩家控制的角色,这个角色的职业是Paladin
        /// </summary>
        /// <returns></returns>
        public static Character CreatePlayer(int difficultyLevel)
        {
            Character c = new Character()
            {
                //人物的基础属性
                Stama         = 46,
                Speed         = 1.2f,
                Crit          = 0.2f,
                Inte          = 60,
                Master        = 0f,
                Defense       = 0f,
                MaxAP         = 0,
                CharacterName = "完美的操纵者",
                Description   = "玩家控制单位",
            };

            c.HP = c.MaxHP;
            c.MP = c.MaxMP;
            c.AP = c.MaxAP;

            c.SkillList.Add(SkillBuilder.CreateSkillP1(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP2(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP3(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP4(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP5(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP6(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP7(c));
            c.SkillList.Add(SkillBuilder.CreateSkillP8(c));
            new PlayerController(c);
            return(c);
        }
        /// <summary>
        /// 由对应的控制器类负责创建对应的角色实例
        /// 好像又回到了wa的结构
        /// </summary>
        /// <returns></returns>
        public static BossController CreateBoss1(int difficultyLevel)
        {
            Character c = CreateBossNormal(difficultyLevel, 25000, "按部就班的便当王", out float miuti);

            //添加并绑定Boss的技能
            c.SkillList = new List <Skill>();

            //添加Controller
            BossController controller = new BossController(c);

            c.SkillList.Add(SkillBuilder.CreateSkillB1(c, miuti));
            c.SkillList.Add(SkillBuilder.CreateSkillB2(c, miuti));
            c.SkillList.Add(SkillBuilder.CreateSkillB3(c, miuti));

            return(controller);
        }
        /// <summary>
        /// 由对应的控制器类负责创建对应的角色实例
        /// 好像又回到了wa的结构
        /// </summary>
        /// <returns></returns>
        public static BossController CreateBoss2(int difficultyLevel)
        {
            Character c = CreateBossNormal(difficultyLevel, 20000, "有狂暴的二号王", out float miuti);

            //添加并绑定Boss的技能
            c.SkillList = new List <Skill>();

            //添加Controller
            BossController controller = new BossController(c);

            c.SkillList.Add(SkillBuilder.CreateBOSS2_1(c, miuti));
            c.SkillList.Add(SkillBuilder.CreateBOSS2_2(c, miuti));
            c.SkillList.Add(SkillBuilder.CreateBOSS2_3(c, miuti));
            c.SkillList.Add(SkillBuilder.CreateBOSS2_4(c, miuti));

            return(controller);
        }
Example #4
0
 public NPCController(Character c, int dps) : base(c)
 {
     PerHit = dps;
     s      = SkillBuilder.CreateSkillNPC1(c, HitSpeed);
     c.SkillList.Add(s);
 }