12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.Collections;
- using System.Collections.Generic;
- using Core.Utility;
- using Excel2Json;
- using Fort23.UTool;
- using UnityEngine;
- using UnityEngine.Serialization;
- [System.Serializable]
- public class CombatHeroInfo
- {
-
- public EncryptionLong hp=new EncryptionLong();
- public EncryptionLong defense=new EncryptionLong();
- public EncryptionLong attack=new EncryptionLong();
- public EncryptionFloat attSpeed=new EncryptionFloat();
- public EncryptionFloat crit=new EncryptionFloat();
- public EncryptionFloat critDamage=new EncryptionFloat();
- public EncryptionFloat dodge=new EncryptionFloat();
- public int lv;
- public int star;
-
- public HeroModelConfig modelConfig;
- /// <summary>
- /// 1=英雄 2=小怪 3=精英怪 4=boss
- /// </summary>
- public int heroType;
- public string modelName;
- public float maxDis=2;
- public float maxDisTo=2*2;
- public int[] skillId;
- public bool isGpu;
- public void InitMonster(int id,int level)
- {
- HeroModelConfig heroModelConfig = ConfigComponent.Instance.Get<HeroModelConfig>(id);
- HeroPowerUpConfig heroPowerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(level);
- hp=(EncryptionLong)(heroModelConfig.hp*heroPowerUpConfig.HPFactor);
- defense=(EncryptionLong)(heroModelConfig.def*heroPowerUpConfig.DEFFactor);
- attack=(EncryptionLong)(heroModelConfig.attack*heroPowerUpConfig.ATKFactor);
- attSpeed=(EncryptionFloat)heroModelConfig.speed_atk;
- crit=(EncryptionFloat)heroModelConfig.crit;
- skillId = heroModelConfig.skillID;
- modelName = heroModelConfig.model;
- isGpu = heroModelConfig.isUseGpu;
- maxDis=heroModelConfig.range_atk;
- maxDisTo = maxDis * maxDis;
- }
- public CombatHeroInfo Copy()
- {
- CombatHeroInfo combatHeroInfo = (CombatHeroInfo)MemberwiseClone();
- return combatHeroInfo;
- }
- }
|