// Use this for initialization public void Init(HeroDataFormat data) { heroData = data.CloneEx(); int[] _points = new int[SkillNumber]; for (int i = 0; i < SkillNumber; i++) { _points [i] = -1; } int dataLength = heroData.SkillList.Count; for (int i = 0; i < dataLength; i++) { _points [i] = heroData.Attributes.SkillPoint; } for (int i = 0; i < SkillControllers.Length; i++) { SkillControllers [i].Init(_points[i]); } SkillDataListUpdate(heroData); SkillPointZeroOrNot(heroData.Attributes.SkillPoint); }
void OnHeroCacheChanged(int slotID, HeroDataFormat heroDataCache) { if (this.heroData == null) { return; } if (this.heroData.Attributes.SlotID != slotID) { return; } this.heroData = heroDataCache.CloneEx(); if (this.heroData.EquipmentList != null && this.heroData.EquipmentList.Count > 0) { for (int i = 0; i < this.heroData.EquipmentList.Count; i++) { if (this.heroData.EquipmentList [i].EquipmentType == this.equipmentType) { this.EquipmentBuildData.HeroEquipmentData = this.heroData.EquipmentList [i].CloneEx(); CurrentEquipment.LoadDataToDisplay(this.EquipmentBuildData.HeroEquipmentData); CurrentAttribute.SetDataForDisplay(this.heroData, this.EquipmentBuildData.HeroEquipmentData); } } } }
public void InitDisplayAndLoadData(HeroDataFormat heroData) { this.selfHeroData = heroData.CloneEx(); //hero jumped if (!heroData.Attributes.Active) { SkillOperaterButtonView.gameObject.SetActive(false); } for (int i = 0; i < this.selfHeroData.SkillList.Count; i++) { if (this.selfHeroData.SkillList [i].SlotID == this.SlotId) { this.selfHeroSkillData = this.selfHeroData.SkillList [i]; } } var _multiSkillName = SkillStringsTableReader.Instance.GetMultiLangStringWithoutParam(this.selfHeroSkillData.DBSkillID, SkillNameLabel); var _multiSkillDescription = SkillStringsTableReader.Instance.GetMultiLangStringWithParam(this.selfHeroSkillData.DBSkillID, this.selfHeroSkillData.Level, SkillDescriptionLabel); SkillName.SetNewMultiStringAndDisplay(_multiSkillName); SkillDescription.SetNewMultiStringAndDisplay(_multiSkillDescription); SkillIconViewScript.SetSkillIconByPath(this.selfHeroSkillData.TexturePath, this.selfHeroSkillData.TextureIconID); SkillLevelDisplay(this.selfHeroSkillData.Level); }
void OnHeroCacheChanged(int slotID, HeroDataFormat heroDataCache) { if (this.heroData == null) { return; } if (this.heroData.Attributes.SlotID != slotID) { return; } this.heroData = heroDataCache.CloneEx(); if (this.heroData.EquipmentList != null && this.heroData.EquipmentList.Count > 0) { for (int i = 0; i < this.heroData.EquipmentList.Count; i++) { if (this.heroData.EquipmentList [i].EquipmentType == this.heroEquipment.EquipmentType) { this.heroEquipment = this.heroData.EquipmentList [i].CloneEx(); this.reinforceSuccessRate = EquipmentDataManager.Instance.GetEquipmentReinforceSuccessRate(this.heroEquipment.ReinforcementLevel); ReinforceSuccessRateView.SetParam(this.reinforceSuccessRate); ReinforceSuccessRateView.Display(); LabelControllerScript.LoadDataToDisplay(this.heroEquipment); IsReinforceLevelMax(this.heroEquipment.ReinforcementLevel); } } } }
void OnHeroCacheChanged(int slotID, HeroDataFormat heroCache) { if (this.HeroDataCache == null) { return; } if (this.HeroDataCache.Attributes.SlotID != slotID) { return; } this.HeroDataCache = heroCache.CloneEx(); }
public void InitFight(HeroDataFormat heroData) { this.HeroDataCache = heroData.CloneEx(); base.FightData.InitFight(this.HeroDataCache); base.InitBodyView(this.HeroDataCache.AnimationInfo.TexturePath, this.HeroDataCache.AnimationInfo.IdleID, this.HeroDataCache.AnimationInfo.AttackID, this.HeroDataCache.AnimationInfo.GetDamageID, this.HeroDataCache.AnimationInfo.DeadID); this.state = STATES.ALIVE; }
void OnHeroCacheChanged(int slotId, HeroDataFormat heroData) { if (this.selfHeroData == null) { return; } if (this.selfHeroData.Attributes.SlotID != slotId) { return; } this.selfHeroData = heroData.CloneEx(); }
void OnHeroCacheChanged(int slotId, HeroDataFormat heroData) { if (this.heroData == null) { return; } if (this.heroData.Attributes.SlotID != slotId) { return; } this.heroData = heroData.CloneEx(); SkillPointZeroOrNot(this.heroData.Attributes.SkillPoint); }
void OnHeroCacheChanged(int slotID, HeroDataFormat heroDataCache) { if (this.heroDataFormat == null) { return; } if (this.heroDataFormat.Attributes.SlotID != slotID) { return; } this.heroDataFormat = heroDataCache.CloneEx(); AttributeTakeOff.DisplayWithUnequippedEquipment(this.heroDataFormat, this.equipmentTakeOff); }
void OnHeroCacheChanged(int slotID, HeroDataFormat heroCache) { if (this.selfHeroData == null) { return; } if (this.selfHeroData.Attributes.SlotID != slotID) { return; } this.selfHeroData = heroCache.CloneEx(); ClearOldData(); DisplayData(); }
void OnHeroCacheChanged(int slotId, HeroDataFormat heroData) { if (this.selfHeroData == null) { return; } if (this.selfHeroData.Attributes.SlotID != slotId) { return; } this.selfHeroData = heroData.CloneEx(); for (int i = 0; i < this.selfHeroData.SkillList.Count; i++) { if (this.selfHeroData.SkillList [i].SlotID == this.SlotId) { // skillID changed, new multiLang if (this.selfHeroData.SkillList [i].DBSkillID != this.selfHeroSkillData.DBSkillID) { var _multiSkillName = SkillStringsTableReader.Instance.GetMultiLangStringWithoutParam(this.selfHeroData.SkillList [i].DBSkillID, SkillNameLabel); var _multiSkillDescription = SkillStringsTableReader.Instance.GetMultiLangStringWithParam(this.selfHeroData.SkillList [i].DBSkillID, this.selfHeroData.SkillList [i].Level, SkillDescriptionLabel); SkillName.SetNewMultiStringAndDisplay(_multiSkillName); SkillDescription.SetNewMultiStringAndDisplay(_multiSkillDescription); SkillIconViewScript.SetSkillIconByPath(this.selfHeroData.SkillList [i].TexturePath, this.selfHeroData.SkillList [i].TextureIconID); } // skill data changed, do not need new multiLang else if (this.selfHeroData.SkillList [i].DBSkillID == this.selfHeroSkillData.DBSkillID) { SkillName.DisplayMessage(); var _descriptionParam = SkillStringsTableReader.Instance.GetSkillDescriptionParameter(this.selfHeroData.SkillList [i].DBSkillID, this.selfHeroData.SkillList [i].Level); var _parameterArray = _descriptionParam.Cast <object> ().ToArray(); SkillDescription.MultiLangParamUpdate(_parameterArray); } this.selfHeroSkillData = this.selfHeroData.SkillList [i]; } } SkillLevelDisplay(this.selfHeroSkillData.Level); }
public void Init(HeroDataFormat heroData, HeroSkillFormat skillData) { this.selfHeroData = heroData.CloneEx(); this.NewHeroSkillData = skillData; //if the Skill is the Upgrade one, //Show Level = 1 int _levelForDisplay = this.NewHeroSkillData.Level; if (_levelForDisplay == 0) { _levelForDisplay += 1; } this.HeroSkillDataForDisplay = new HeroSkillFormat(new HeroSkillSaveDataFormat(this.NewHeroSkillData.SlotID, this.NewHeroSkillData.DBSkillID, _levelForDisplay)); SkillName.Init(); SkillLevel.Init(); SkillDescription.Init(); SkillIconViewScript.Init(); PopSkillManager = FindObjectOfType <PopSkillCanvasManager>(); }
// Use this for initialization public void Init(HeroDataFormat heroData) { this.selfHeroData = heroData.CloneEx(); SkillPointView.Init(); SetHeroSkillPoint(this.selfHeroData.Attributes.SkillPoint); }