| | |
| | | public partial class TeamHero |
| | | { |
| | | public int heroId; |
| | | public HeroConfig heroConfig; |
| | | |
| | | public HeroCountry Country; |
| | | public int SkinID; |
| | | public HeroSkinConfig skinConfig; |
| | | public string guid; |
| | | public string guid; |
| | | |
| | | public float modelScale = 1f; |
| | | |
| | | |
| | | public TeamBase teamBase |
| | |
| | | // 服务器来的构造 |
| | | public TeamHero(HB424_tagSCTurnFightInit.tagSCTurnFightObj fightObj, TeamBase _teamBase) |
| | | { |
| | | // 判断一下是npc还是玩家 |
| | | heroId = (int)fightObj.HeroID; |
| | | heroConfig = HeroConfig.Get(heroId); |
| | | SkinID = (int)fightObj.SkinID; |
| | | skinConfig = HeroSkinConfig.Get(SkinID); |
| | | |
| | | if (fightObj.NPCID > 0) |
| | | { |
| | | //走NPC的逻辑 |
| | | NPCConfig npcConfig = NPCConfig.Get((int)fightObj.NPCID); |
| | | Country = (HeroCountry)npcConfig.Country; |
| | | SkinID = npcConfig.SkinID; |
| | | modelScale = npcConfig.ModelScale; |
| | | } |
| | | else |
| | | { |
| | | //走玩家逻辑 |
| | | var heroConfig = HeroConfig.Get(heroId); |
| | | Country = (HeroCountry)heroConfig.Country; |
| | | SkinID = (int)fightObj.SkinID; |
| | | modelScale = 1f; |
| | | } |
| | | |
| | | |
| | | skinConfig = HeroSkinConfig.Get(SkinID); |
| | | teamBase = _teamBase; |
| | | |
| | | ObjID = (int)fightObj.ObjID; |
| | |
| | | public TeamHero(HeroInfo heroInfo, int posNum, TeamBase _teamBase) |
| | | { |
| | | heroId = heroInfo.itemHero.config.ID; |
| | | heroConfig = HeroConfig.Get(heroId); |
| | | SkinID = heroInfo.SkinID; |
| | | skinConfig = heroInfo.skinConfig; |
| | | |