public ActionResult Experience_list(string action)
        {
            ExperienceList responce = new ExperienceList();

            try
            {
                string            query = "EXEC spDropdown '" + action + "'";
                DataSet           ds    = d.BindDataset(query);
                List <Experience> lst   = new List <Experience>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        Experience v = new Experience();
                        v.ID         = int.Parse(ds.Tables[0].Rows[i]["Id"].ToString());
                        v.experience = ds.Tables[0].Rows[i]["Experience"].ToString();
                        lst.Add(v);
                    }
                    responce.data        = lst;
                    responce.Description = "Data Found";
                }
            }
            catch (Exception e)
            {
                responce.Description = e.Message;
            }
            return(Json(responce));
        }
Example #2
0
    private List <Skill> skills;                      //技能列表
                                                      // 数据 {skill1,skill2,skill3...}



    //初始化
    public Person(int personID, string personName, int blood, int blue, int physicsAttack, int specialAttack, int speed, int physicsDefense, int specialDefense, int lv, int currentExperience, int bloodGrowth, int specialAttackGrowth, int physicsAttackGrowth, int speedGrowth, int physicsDefenseGrowth, int specialDefenseGrowth, int blueGrowth, string attackAniPath, int imageType, int experience, int money)
    {
        //buffs
        this.buffs                = new List <Buff> {
        };
        this.skills               = new List <Skill> {
        };
        this.personID             = personID;
        this.personName           = personName;
        this.blood                = blood;
        this.bloodMax             = blood;
        this.blue                 = blue;
        this.blueMax              = blue;
        this.physicsAttack        = physicsAttack;
        this.specialAttack        = specialAttack;
        this.speed                = speed;
        this.physicsDefense       = physicsDefense;
        this.specialDefense       = specialDefense;
        this.bloodGrowth          = bloodGrowth;
        this.blueGrowth           = blueGrowth;
        this.physicsAttackGrowth  = physicsAttackGrowth;
        this.physicsAttackGrowth  = physicsAttackGrowth;
        this.speedGrowth          = speedGrowth;
        this.physicsDefenseGrowth = physicsDefenseGrowth;
        this.specialDefenseGrowth = specialDefenseGrowth;
        this.lv = lv;
        this.currentExperience = currentExperience;
        this.experienceList    = new ExperienceList();
        this.experienceMax     = CalculateExperienceMax();  //级经验上限公式待定....
        this.attackAniPath     = attackAniPath;
        this.imageType         = imageType;
        this.experience        = experience;
        this.money             = money;
        this.buffFactory       = new BuffFactory();
        this.skillFactory      = new SkillFactory();
        // 添加技能
        this.skills.Add(this.skillFactory.CreateSkill("普通攻击"));
        this.skills.Add(this.skillFactory.CreateSkill("无操作"));

        //初始化装备
        this.inventory = new Dictionary <string, Equipment> {
            { "Heads", null },
            { "Top", null },
            { "Bottom", null },
            { "Weapon", null },
            { "Armor", null },
            { "Accessorie", null },
        };

        //待添加...
    }
Example #3
0
 private void FunctionClear()
 {
     SelectedUnit.ListOfOptions.Clear();
     SelectedExperience = ExperienceList.First();
     Points             = 0;
 }
Example #4
0
 internal void AddToExperienceList(Experience exp)
 {
     ExperienceList = ExperienceList.Add(exp);
 }