Beispiel #1
0
        public string InsertNewSkill(string skillValue)
        {
            var doesSkillExist = _userRepository.GetSkillByName(skillValue);

            if (doesSkillExist != null && doesSkillExist.ID != null)
            {
                return(ErrorMessages.SkillExists.ToString());
            }
            else
            {
                var user    = GetCurrentUserContext();
                var dbSkill = new skill();
                dbSkill.CREATED_BY  = user.EmailId;
                dbSkill.CREATED_ON  = DateTime.Now;
                dbSkill.STATUS      = SkillStatus.Active.ToString();
                dbSkill.STATUS_DATE = DateTime.Now;
                dbSkill.VALUE       = skillValue;

                var result = _userRepository.AddNewSkill(dbSkill);
                if (result > 0)
                {
                    return(SuccessMessages.SkillAdded.ToString());
                }
                return(ErrorMessages.SkillExists.ToString());
            }
        }
Beispiel #2
0
        public ActionResult EditSkills(string serializedModel, int id, FormCollection form)
        {
            skill   skillDomain             = new skill();
            project projectDomain           = projectService.GetById(id);
            List <SkillViewModel> listSkill = JsonConvert.DeserializeObject <List <SkillViewModel> >(serializedModel);

            ViewBag.TAGS = listSkill;
            //First delete after add
            foreach (var skill in listSkill)
            {
                //Delete
                projectskill projectSkillDomainDelete = projectSkillService.GetMany().Where(a => a.idProject == id)
                                                        .Where(b => b.idSkill == skill.IdSkill).FirstOrDefault();
                if (projectSkillDomainDelete != null)
                {
                    projectSkillService.Delete(projectSkillDomainDelete);
                    projectSkillService.Commit();
                }
                //Add
                skillDomain.IdSkill = skill.IdSkill;
                projectskill projectSkillDomain = new projectskill();
                projectSkillDomain.idSkill    = skillDomain.IdSkill;
                projectSkillDomain.idProject  = projectDomain.id;
                projectSkillDomain.percentage = Int32.Parse(form.Get(skill.NameSkill));
                projectSkillService.Add(projectSkillDomain);
                projectSkillService.Commit();
            }
            return(RedirectToAction("Index"));
        }
Beispiel #3
0
    public void DescribeSkill(skill s)//将技能信息显示在右边的方框内
    {
        if (!img_Icon.gameObject.activeInHierarchy)
        {
            img_Icon.gameObject.SetActive(true);
        }
        img_Icon.sprite = Resources.Load <Sprite>("Skills/" + s.spritePath);
        txt_Name.text   = s.name;
        //技能消耗
        string skillcost = "";

        if (s.MpCost <= 0 && s.HpCost <= 0)
        {
            skillcost = "无消耗";
        }
        else if (s.MpCost > 0 && s.HpCost > 0)
        {
            skillcost = "消耗 " + s.MpCost + "能量, " + s.HpCost + "生命";
        }
        else
        {
            if (s.MpCost > 0)
            {
                skillcost = "消耗 " + s.MpCost + "能量";
            }
            if (s.HpCost > 0)
            {
                skillcost = "消耗 " + s.HpCost + "生命";
            }
        }

        txt_Detail.text = "" + s.detail + "\n\n" + skillcost + "\n冷却时间: " + s.Cd + " 秒";
    }
Beispiel #4
0
 // Use this for initialization
 void Awake()
 {
     power    = 15;
     s1       = this;
     lastTime = 5.0f;
     isActive = false;
 }
Beispiel #5
0
 private void saveSkills()//保存技能数据伟XML文档
 {
     inactiveSkillXml.RemoveAll();
     inActiveSkillElement.RemoveAll();
     for (int i = 0; i < allSkillDrags.Length; i++)
     {
         if (i < 6)//前六个应用到界面
         {
             skills_OnUI_Pos[i] = i;
             skills_OnUI[i]     = allSkillDrags[i].thisSkill;
         }
         else//后六个存储为XML
         {
             if (allSkillDrags[i].existSkill)//如果有技能
             {
                 skill sk = allSkillDrags[i].thisSkill;
                 SaveInactiveSkillXML(sk.ID, sk.name, sk.Cd, sk.detail, sk.spritePath, sk.MpCost, sk.MpCost, i);
             }
             else
             {
                 SaveInactiveSkillXML(-1, "", 0, "", "", 0, 0, i); //无技能
             }
         }
     }
     inactiveSkillXml.Save(path + "/SkillsInavtive.xml");//保存为启用的技能信息
     skillload.positionIdxs = skills_OnUI_Pos;
     skillload.skillsonUI   = skills_OnUI;
 }
Beispiel #6
0
    public void SetThisSkill(skill s)//设置当前技能图标
    {
        //print(s.spritePath);
        if (!isActive)
        {
            thisImg.color = new Color(thisImg.color.r, thisImg.color.g, thisImg.color.b, 1);
        }
        if (!existSkill)
        {
            existSkill = true;
        }
        print("SkillIcon: " + skillIcon.gameObject.activeSelf);
        if (!skillIcon.gameObject.activeSelf)
        {
            skillIcon.gameObject.SetActive(true);                                  //激活子物体
        }
        thisSkill = s;
        if (s.ID < 0)//如果技能索引小于零,置空
        {
            SetEmpty();
            return;
        }
        Sprite sp = Resources.Load <Sprite>("sSkills/" + s.spritePath);

        skillIcon.gameObject.SetActive(true);
        skillIcon.sprite = Resources.Load <Sprite>("Skills/" + s.spritePath);
    }
        public skill getMostPopularSkill(List <user> users)
        {
            skill            max              = new skill();
            int              maxcounter       = 0;
            ServiceUserSkill serviceuserskill = new ServiceUserSkill();
            List <skill>     skills           = serviceuserskill.getFromUsers(users);

            foreach (var s in skills)
            {
                int counter = 0;
                foreach (var u in users)
                {
                    foreach (var us in u.userskills)
                    {
                        if (us.skill.id == s.id)
                        {
                            counter++;
                        }
                    }
                }
                if (maxcounter <= counter)
                {
                    maxcounter = counter;
                    max        = s;
                }
            }
            return(max);
        }
Beispiel #8
0
    //设置技能
    public void SetSkill(SkillDrag sd)
    {
        if (existSkill)
        {
            //交换图标
            Sprite tempSprite = skillIcon.sprite;
            skillIcon.sprite    = sd.skillIcon.sprite;
            sd.skillIcon.sprite = tempSprite;
            //交换技能
            skill tempSkill = this.thisSkill;
            this.thisSkill = sd.thisSkill;
            sd.thisSkill   = tempSkill;
        }
        else//如果该图标为空
        {
            SetNotEmpty(sd.skillIcon.sprite, sd.thisSkill);//设为非空
            thisSkill        = sd.thisSkill;
            skillIcon.sprite = sd.skillIcon.sprite;//设置图标
            //sd.skillIcon.color = new Color(sd.skillIcon.color.r, sd.skillIcon.color.g, sd.skillIcon.color.b, 0);
            //sd.thisSkill = null;
            sd.SetEmpty();//将对方置空
        }

        //如果拖到下方区域,重新整理
        if ((!isActive && !sd.existSkill) || (!sd.isActive && !sd.existSkill))
        {
            skillsSetting.SortInactiveSkills();
        }
    }
 public void Buff()
 {
     skillTemp    = player.playerSkills.Find(x => x.skillName.Contains("Buff"));
     damageTemp   = player.GetComponent <playerScript>().damage *(1 + (skillTemp.power / 100));
     doBuff       = true;
     durationTemp = skillTemp.duration;
 }
Beispiel #10
0
        public ActionResult skillsedit(int id, skill skill, HttpPostedFileBase photo)
        {
            skill.photoid = id;

            string filename  = Path.GetFileName(photo.FileName);
            string _filename = DateTime.Now.ToString("yymmssfff") + filename;
            string extension = Path.GetExtension(photo.FileName);
            string path      = Path.Combine(Server.MapPath("~/Content/Upload/"), _filename);

            //string fullpath = Path.Combine(path, filename);
            skill.photo = "~/Content/Upload/" + _filename;
            if (extension.ToLower() == ".jpg" || extension.ToLower() == ".jpeg" || extension.ToLower() == ".png")
            {
                if (photo.ContentLength <= 100000)
                {
                    context.Entry(skill).State = EntityState.Modified;
                    if (context.SaveChanges() > 0)
                    {
                        photo.SaveAs(path);
                        ModelState.Clear();
                    }
                }
                else
                {
                    ViewBag.msg = "not valid";
                }
            }


            /*context.Entry(skill).State = EntityState.Modified;
             * context.SaveChanges();  //create the query*/
            return(RedirectToAction("Index", "Dashboard"));
        }
Beispiel #11
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindWithTag("Player").GetComponent <playerScript>();
     self   = player.playerSkills.Find(x => x.skillName.Contains("Nuke"));
     power  = self.power;
     size   = self.size;
 }
Beispiel #12
0
 protected virtual void OnEnable()
 {
     duration     = baseDuration;
     CD           = baseCD;
     skill        = skill.dispo;
     validTargets = new List <IDamageable>();
 }
Beispiel #13
0
    public void Load()
    {
        GetComponent <skill>().Load();
        GetComponent <player>().Load();
        //
        Skills = GetComponent <skill>();
        Player = GetComponent <player>();
        //

        for (int i = 0; i < ContentView.childCount; i++)
        {
            Destroy(ContentView.GetChild(i).gameObject);
        }
        foreach (var item in Skills.Skill.SkillList)
        {
            if (item.IdMC == Player.Player.MC)
            {
                var e        = Instantiate(ItemSkill, ContentView);
                var controll = e.GetComponent <ItemSkillControll>();
                controll.item = item;
                controll.IdMC = item.IdMC;
                controll.Show_OnClick();
            }
        }
    }
Beispiel #14
0
    /// <summary>
    /// Agrega una skill a la lista de las skilles que requieren de esta skill para desbloquearlas.
    /// </summary>
    /// <param name="child">Skill que se agregara.</param>
    /// <param name="minLevel">Nivel minimo para desbloquear la skill agregada.</param>
    public void addChild(skill child, int minLevel)
    {
        if (child == null)
        {
            return;
        }
        if (minLevel < 1)
        {
            minLevel = 1;
        }
        if (children == null)
        {
            children = new List <skill>();
        }
        if (minLevels == null)
        {
            minLevels = new List <int>();
        }

        if (child.parents == null)
        {
            child.parents = new List <skill>();
        }

        child.parents.Add(this);

        children.Add(child);
        minLevels.Add(minLevel);
    }
Beispiel #15
0
    protected virtual void Update()
    {
        if (skill == skill.actif)
        {
            duration -= Time.deltaTime;
            if (duration <= 0)
            {
                if (cdEnd != null)
                {
                    cdEnd();
                }

                skill    = skill.inCD;
                duration = baseDuration;
            }
        }
        else if (skill == skill.inCD)
        {
            CD -= Time.deltaTime;
            if (CD <= 0)
            {
                skill = skill.dispo;
                CD    = baseCD;
            }
        }
    }
Beispiel #16
0
 public void Load()
 {
     Player = MainEvent.GetComponent <player>();
     Items  = MainEvent.GetComponent <skill>();
     foreach (var item in Items.Skill.SkillList)
     {
         if (item.IdSkill == IdSkill)
         {
             ImageSkill.sprite = Resources.Load <Sprite>("Skills/Icons/" + item.IdSkill.ToString());
             NameSkill.text    = item.NameSkill;
             Process.text      = "Level: +" + item.UpLevel.ToString() + "/" + item.UpMax.ToString();
             CoinUpdate.text   = item.CoinUp.ToString() + " Coin to up level " + (item.UpLevel + 1).ToString();
             Description.text  = OnLoadDescription(item);
             if (item.UpLevel >= item.UpMax)
             {
                 UpdateButton.GetComponentInChildren <Text>().text = "In Max Level Upgrade";
                 UpdateButton.interactable = false;
                 CoinUpdate.text           = "In Max Level Upgrade";
             }
             else
             {
                 if (Player.Player.Coin < item.CoinUp)
                 {
                     UpdateButton.interactable = false;
                     UpdateButton.GetComponentInChildren <Text>().text = "Not enough coin";
                 }
                 else
                 {
                     UpdateButton.interactable = true;
                     UpdateButton.GetComponentInChildren <Text>().text = "Upgrade";
                 }
             }
         }
     }
 }
Beispiel #17
0
 private void Update_Onclick()
 {
     Items = MainEvent.GetComponent <skill>();
     foreach (var item in Items.Skill.SkillList)
     {
         if (item.IdSkill == IdSkill)
         {
             Player.Player.Coin -= item.CoinUp;
             item.CoinUp        += (int)(item.CoinUp * item.CoinupInCrease);
             item.AMUp          += item.AMUp * item.AblityUp;
             item.CoolDown      -= item.CoolDown * item.AblityUp;
             item.CristUp       += item.CristUp * item.AblityUp;
             item.DameSkill     += item.DameSkill * item.AblityUp;
             item.DameUp        += item.DameUp * item.AblityUp;
             item.DodgeUp       += item.DodgeUp * item.AblityUp;
             item.HpRegen       += item.HpRegen * item.AblityUp;
             item.MRUp          += item.MRUp * item.AblityUp;
             item.UpLevel       += 1;
             Items.Save();
             Player.Save();
             MainEvent.GetComponent <ItemSkillLoad>().OnLoadItem();
             Load();
         }
     }
 }
Beispiel #18
0
        public IHttpActionResult Putskill(int id, skill skill)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != skill.id)
            {
                return(BadRequest());
            }

            db.Entry(skill).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!skillExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Beispiel #19
0
    public void LoadSkill(string name, int num, int level)
    {
        skill find = globalData.allSkills.Find(x => x.skillName.Contains(name));

        chosenSkills[num]      = find;
        loadedSkillLevels[num] = level;
    }
Beispiel #20
0
        public ActionResult Create(skill skills)
        {
            HttpClient client = new HttpClient();

            client.BaseAddress = new Uri("http://127.0.0.1:9080");
            client.PostAsJsonAsync <skill>("Pidev4GL-web/rest/Skill/ajout", skills).ContinueWith((postTask) => postTask.Result.EnsureSuccessStatusCode());
            return(RedirectToAction("Index"));
        }
Beispiel #21
0
        public ActionResult DeleteConfirmed(long id)
        {
            skill skill = _skillService.GetById((int)id);

            _skillService.Delete(skill);
            _skillService.commit();
            return(RedirectToAction("Index"));
        }
Beispiel #22
0
 // Use this for initialization
 void Start()
 {
     player   = GameObject.FindWithTag("Player").GetComponent <playerScript>();
     self     = player.playerSkills.Find(x => x.skillName.Contains("SlowField"));
     size     = self.size;
     duration = self.duration;
     power    = self.power;
 }
Beispiel #23
0
 private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.tabControl1.SelectedIndex == 0)
     {
         this.currentSet.skill = this.copySet.skill;
         this.file.css[this.cbChar.SelectedIndex] = this.currentSet;
         this.lck = false;
         int selectedIndex = this.cbChar.SelectedIndex;
         this.cbChar.SelectedIndex = 0;
         this.cbChar.Items.Clear();
         for (int index = 0; index < this.file.css.Count; ++index)
         {
             ComboBox.ObjectCollection items = this.cbChar.Items;
             string       str1         = "Character ";
             charSkillSet charSkillSet = this.file.css[index];
             string       str2         = charSkillSet.charID.ToString("000");
             string       str3         = " - Costume ";
             charSkillSet = this.file.css[index];
             string str4 = charSkillSet.costumeID.ToString("00");
             string str5 = str1 + str2 + str3 + str4;
             items.Add((object)str5);
         }
         this.cbChar.SelectedIndex = selectedIndex;
         this.lck = true;
     }
     else
     {
         this.currentSkill = this.copySkill;
         this.UpdateCurrentSkill();
         this.UpdateSkillList();
         this.lck = false;
         this.txtShortName.Text = this.currentSkill.shortName;
         this.txtid.Text        = this.currentSkill.id.ToString();
         this.txtid2.Text       = this.currentSkill.id2.ToString();
         this.textBox1.Text     = this.currentSkill.racelock.ToString();
         this.txt1.Text         = this.currentSkill.unk1.ToString();
         this.txt2.Text         = this.currentSkill.unk2.ToString();
         this.txtHair.Text      = this.currentSkill.hair.ToString();
         this.txt3.Text         = this.currentSkill.unk3.ToString();
         this.txt4.Text         = this.currentSkill.Paths[0];
         this.txt5.Text         = this.currentSkill.Paths[1];
         this.txt6.Text         = this.currentSkill.Paths[2];
         this.txt7.Text         = this.currentSkill.Paths[3];
         this.txt8.Text         = this.currentSkill.Paths[4];
         this.txt9.Text         = this.currentSkill.Paths[5];
         this.txt10.Text        = this.currentSkill.Paths[6];
         this.txt11.Text        = this.currentSkill.unk4.ToString();
         this.txt12.Text        = this.currentSkill.unk5.ToString();
         this.txt13.Text        = this.currentSkill.unk6.ToString();
         this.txt14.Text        = this.currentSkill.unk7.ToString();
         this.txt15.Text        = this.currentSkill.unk8.ToString();
         this.txt16.Text        = this.currentSkill.unk9.ToString();
         this.txt17.Text        = this.currentSkill.unk10.ToString();
         this.txt18.Text        = this.currentSkill.unk11.ToString();
         this.lck = true;
     }
     this.lblStatus.Text = "Data has been pasted in";
 }
Beispiel #24
0
    void init_garen_skills()
    {
        Q_skill = new skill();
        Q_skill.need_indicate_target = false;
        W_skill = new skill();
        W_skill.need_indicate_target = false;
        W_skill.cd = 24f;
        E_skill    = new skill();
        E_skill.need_indicate_target = false;
        R_skill = new skill();
        R_skill.need_indicate_target = true;
        Passive_skill = new skill();

        Q_timer = new Utility.Timer(Q_cd);
        Q_timer.finish();
        W_timer = new Utility.Timer(W_skill.cd);
        W_timer.finish();
        E_timer = new Utility.Timer(E_cd);
        E_timer.finish();
        R_timer = new Utility.Timer(R_skill.cd);
        R_timer.finish();
        Passive_timer = new Utility.Timer(Passive_skill.cd);

        Q_flag       = false;
        W_flag       = false;
        E_flag       = false;
        Passive_flag = false;

        //Q : Decisive Strike
        Q_skill.cd       = 8f;
        Q_skill.dmg      = 30f;
        Q_skill.ad_ratio = 1.4f;
        Q_skill.timer.change_max_timer(Q_skill.cd);
        Q_dur_timer      = new Utility.Timer(4.5f);    //its fixed
        Q_move_dur_timer = new Utility.Timer(Q_move_time);
        Q_silence_time   = 1.5f;
        //TODO test only
        Q_skill.level = 4;
        upgrade_skill("Q");

        //W :
        W_dur_timer = new Utility.Timer(W_dur);

        //E : Judgement
        E_dur_timer  = new Utility.Timer(E_dur);
        E_aoe_prefab = Resources.Load("Prefabs/Champions/Garen/Garen_E_prefab") as GameObject;
        E_damage     = new Types.damage_combo();
        //TODO test only
        E_skill.level = 0;
        upgrade_skill("E");
        W_skill.level = 0;
        upgrade_skill("W");

        //TODO test only
        R_skill.level = 2;
        upgrade_skill("R");
    }
 //public List<PlayerAttributes> AffectedAttributes = new List<PlayerAttributes>();
 public skill(skill s)
 {
     ID          = s.ID;
     icon        = s.icon;
     skillname   = s.skillname;
     Description = s.Description;
     cooldown    = s.cooldown;
     mana        = s.mana;
 }
Beispiel #26
0
 public TrainingSkill(int skillID, int level, int trainingStartSP, int levelStartSP, int levelEndSP, DateTime endDate, DateTime startDate)
 {
     this.Skill           = SDEEntities.SDE.GetSkillFromID(skillID).First();
     this.TrainingLevel   = level;
     this.TrainingStartSP = trainingStartSP;
     this.LevelEndSP      = levelEndSP;
     this.LevelStartSP    = levelStartSP;
     this.EndDate         = endDate;
     this.StartDate       = startDate;
 }
    public void Heal()
    {
        skillTemp = player.playerSkills.Find(x => x.skillName.Contains("Heal"));

        shouldTick = true;
        doHeal     = true;
        //set this early to get the inital tick on startup
        tick         = true;
        durationTemp = skillTemp.duration;
    }
Beispiel #28
0
 public void SetNotEmpty(Sprite sp, skill sk)//设为非空
 {
     existSkill = true;
     if (!isActive)
     {
         thisImg.color = new Color(thisImg.color.r, thisImg.color.g, thisImg.color.b, 1);
     }
     skillIcon.gameObject.SetActive(true); //激活子物体
     thisSkill        = sk;
     skillIcon.sprite = sp;                //设置图标
 }
Beispiel #29
0
        public IHttpActionResult Getskill(int id)
        {
            skill skill = db.skills.Find(id);

            if (skill == null)
            {
                return(NotFound());
            }

            return(Ok(skill));
        }
 public ActionResult Edit([Bind(Include = "ID,name")] skill skill)
 {
     //TODO: This action need to be deeply reviewed
     if (ModelState.IsValid)
     {
         db.Entry(skill).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(skill));
 }
Beispiel #31
0
 public attack()
 {
     attackvalue = 0;
     ison = false;
     power = 10;
     attackrange = new int[6];
     for (int i=0; i<6; i++) {
         attackrange[i]=0;
             }
     s = new skill[4];
     for(int i=0; i<4; i++) {
         s[i]=new skill();
     }
 }
Beispiel #32
0
 public skill(skill otherskill)
 {
     name = otherskill.getName();
     level = otherskill.getLevel();
 }
Beispiel #33
0
 public void setskill(skill sk,int i)
 {
     s[i] = sk;
 }
Beispiel #34
0
 public void addBuff(int a,skill s)
 {
     float m = s.value;
     if (a == 0)
         m = -m;
     switch(s.type){
     case "hp":this.hp+=m;break;
     case "at":this.at+=m;break;
     case "ag":this.ag+=m;break;
     case "hi":this.hi+=m;break;
     case "av":this.av+=m;break;
     case "cr":this.cr+=m;break;
     case "cpro":this.cpro+=m;break;
     case "de":this.de+=m;break;
     case "depro":this.depro+=m;break;
     case "atpro":this.atpro+=m;break;
     case "damage":this.damage+=m;break;
     case "enLiMaxPer":this.enLiMaxPer+=m;break;
     case "enLiCurPer":this.enLiCurPer+=m;break;
     case "thLiMaxPer":this.thLiMaxPer+=m;break;
     case "thLiCurPer":this.thLiCurPer+=m;break;
     case "clDem":this.clDem+=m;break;
     case "goldGetSec":this.goldGetSec+=m;break;
     case "goldGet":this.goldGet+=m;break;
     case "goldGetKill":this.goldGetKill+=m;break;
     case "expGet":this.expGet+=m;break;
     case "expNeed":this.expNeed+=m;break;
     case "boxGetProb":this.boxGetProb+=m;break;
     case "boxGoldAdd":this.boxGoldAdd+=m;break;
     case "boxArtProb":this.boxArtProb+=m;break;
     case "boxAdvArtProb":this.boxAdvArtProb+=m;break;
     case "ArtSmeProb":this.ArtSmeProb+=m;break;
     case "ArtSmeNeed":this.ArtSmeNeed+=m;break;
     case "resetGold":this.resetGold+=m;break;
     case "resetExp":this.resetExp+=m;break;
     }
 }
Beispiel #35
0
 // Use this for initialization
 void Start()
 {
     _camera = Camera.main;
     screenWidth = _camera.pixelWidth;
     screenHeight = _camera.pixelHeight;
     for (int i=0; i<4; i++) {
         mattack[i]=new attack();
         mskill[i]=new skill();
     }
     mattack [0].changeOnOff ();
     mattack [0].setAttackrange (0, 1);
     mattack [0].setAttackvalue (100);
 }
Beispiel #36
0
 public skill clone(skill element)
 {
     this.code = element.code;
     this.name = element.name;
     this.cd = element.cd;
     this.thisCd = element.thisCd;
     this.life = element.life;
     this.type = element.type;
     this.NumPer = element.NumPer;
     this.target = element.target;
     this.rate = element.rate;
     this.value = element.value;
     return this;
 }
Beispiel #37
0
 private void getAllHero()
 {
     for (int i=0; i<fightUnitDataJson.Count; i++){
         if(fightUnitDataJson [i] ["type"].ToString()=="0"){
             hero goData=new hero();
             goData.code=fightUnitDataJson [i] ["code"].ToString();
             goData.name=fightUnitDataJson [i] ["name"].ToString();
             goData.level=1;
             goData.maxData.hp=float.Parse(fightUnitDataJson [i]["hp"].ToString());
             goData.maxData.at=float.Parse(fightUnitDataJson [i]["at"].ToString());
             goData.maxData.ag=float.Parse(fightUnitDataJson [i]["ag"].ToString());
             goData.maxData.hi=float.Parse(fightUnitDataJson [i]["hi"].ToString());
             goData.maxData.av=float.Parse(fightUnitDataJson [i]["av"].ToString());
             goData.maxData.cr=float.Parse(fightUnitDataJson [i]["cr"].ToString());
             goData.maxData.cpro=float.Parse(fightUnitDataJson [i]["cpro"].ToString());
             goData.maxData.de=float.Parse(fightUnitDataJson [i]["de"].ToString());
             goData.maxData.depro=float.Parse(fightUnitDataJson [i]["depro"].ToString());
             goData.maxData.atpro=float.Parse(fightUnitDataJson [i]["atpro"].ToString());
             goData.thisData.clone(goData.maxData);
             for(int j=0;j<fightUnitDataJson [i] ["skill"].Count;j++)
             foreach(skill S in skillData)
                 if(fightUnitDataJson [i] ["skill"][j]["skill"].ToString()==S.code){
                     skill sk=new skill();
                     sk.clone(S);
                     goData.skill.Add(sk);
                 }
             allHero.Add(goData);
         }
     }
 }
Beispiel #38
0
 private void getAllkill()
 {
     for (int i=0; i<skillJson.Count; i++){
         skill goData=new skill();
         goData.code=skillJson [i] ["code"].ToString();
         goData.name=skillJson [i] ["name"].ToString();
         goData.cd=float.Parse(skillJson [i] ["cd"].ToString());
         goData.thisCd=goData.cd;
         goData.life=float.Parse(skillJson [i] ["life"].ToString());
         goData.type=skillJson [i] ["type"].ToString();
         goData.NumPer=int.Parse(skillJson [i] ["NumPer"].ToString());
         goData.target=int.Parse(skillJson [i] ["target"].ToString());
         goData.rate=float.Parse(skillJson [i] ["rate"].ToString());
         goData.value=float.Parse(skillJson [i] ["value"].ToString());
         skillData.Add(goData);
     }
 }