示例#1
0
文件: Player.cs 项目: ylbs110/test
 void getHeroData()
 {
     hero = GM.playerHero;
     good = GM.playerGood;
     HeroData = new List<hero> ();
     foreach (playerHero playerGo in hero)
         foreach (hero allGo in GM.allHero)
             if(playerGo.code==allGo.code){
                 hero go=new hero();
                 go.clone(allGo);
                 go.level=playerGo.level;
                 GM.changeAttributeLevel(go);
                 go.thisData.clone(go.maxData);
                 HeroData.Add(go);
                 continue;
             }
 }
示例#2
0
 //怪物数据
 void getEnemyData()
 {
     enemyData = new List<hero>();
     foreach (enemyHero EH in levelEnemyHero)
         foreach (hero ED in allHero) {
             if (EH.elementCode == ED.code) {
                 for(int i=0;i<EH.num;i++){
                 hero go=new hero();
                 go.clone(ED);
                 go.level=EH.level;
                 changeAttributeLevel(go);
                 go.maxData.hp+=EH.hp;
                 go.maxData.at+=EH.at;
                 go.thisData.clone(go.maxData);
                 enemyData.Add (go);
                 }
                 continue;
             }
         }
 }