public void SetData(ReplayMetaInfo.ReplayMetaEntry replayInfo) { if (replayInfo == null) { return; } this.ReplayId = replayInfo.ReplayId; string extra = replayInfo.Extra; if (extra == null) { return; } string[] array = extra.Split(new char[] { '|' }); if (array.Length != 7) { ClientLogger.Error("RecordItem: Data Unknown: " + extra); return; } this.Kill = array[0]; this.Death = array[1]; this.Assist = array[2]; this.GameMode = array[3]; this.GameTime = array[5]; this.IsMvp = array[6].Equals("1"); SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(array[4]); this.Hero = heroMainData; }
public string getMusicID() { SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.npc_id); this.musicid = heroMainData.music_id; return(this.musicid); }
private void AddHero(GameObject go) { SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.mHeroList.value); GameObject gameObject = ResourceManager.Load <GameObject>(heroMainData.model_id, true, true, null, 0, false); if (gameObject == null) { Debug.LogError(string.Concat(new string[] { " ++++ Load SkillObject Error : npc_id = ", this.mHeroList.value, " modelId = ", heroMainData.model_id, " 没有对应的美术资源" })); return; } int num; if (int.TryParse(this.mCount.value, out num)) { if (!this.mHeroRoot.ContainsKey(this.mHeroList.value)) { this.mHeroRoot.Add(this.mHeroList.value, NGUITools.AddChild(this.mRootObj)); this.mHeroRoot[this.mHeroList.value].name = this.mHeroList.value; } for (int i = 0; i < num; i++) { this.CreateHero(gameObject); } } }
private void ShowHeroTargetInfo(Units hero) { this.SetOtherIndicatorActive(false); this.SetHeroIndicatorActive(true); if (this.heroName != hero.name) { this.heroName = hero.name; SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(hero.npc_id); if (heroMainData != null) { this.heroIcon.spriteName = heroMainData.avatar_icon; } } PvpStatisticMgr.HeroData heroData = Singleton <PvpManager> .Instance.StatisticMgr.GetHeroData(hero.unique_id); string text = heroData.MonsterKill.ToString(); string text2 = string.Concat(new object[] { heroData.HeroKill, "/", heroData.Death, "/", heroData.Assist }); int num = text.Length + text2.Length; for (int i = 0; i < 12 - num; i++) { text += " "; } this.heroKillInfo.text = text + text2; this._heroTarget.SetTarget(hero); }
public void Init(string heroID, int type = 0) { switch (type) { case 0: this.heroCardType = SacrificialItem.HeroCardType.Non_Owned; break; case 1: this.heroCardType = SacrificialItem.HeroCardType.Free; break; case 2: this.heroCardType = SacrificialItem.HeroCardType.Owned; break; default: this.heroCardType = SacrificialItem.HeroCardType.Non_Owned; break; } SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(heroID); this.ShowCommon(heroMainData); if (type == 0 || type == 1) { if (type == 1) { this.S_TopLeft.gameObject.SetActive(true); this.S_HeroTexture.material = null; this.S_Frame.GetComponent <UISprite>().spriteName = "Hero_list_frame_blue"; this.S_Name.applyGradient = true; this.S_Name.gradientTop = new Color(0f, 0.733333349f, 0.996078432f); this.S_Name.gradientBottom = new Color(0f, 0.996078432f, 0.9764706f); this.S_Leftはがねおり.spriteName = "Hero_list_name_triangle"; this.S_Rightはがねおり.spriteName = "Hero_list_name_triangle"; } else { this.S_HeroTexture.material = CharacterDataMgr.instance.ReturnMaterialType(10); this.S_Frame.GetComponent <UISprite>().spriteName = "Hero_list_frame_gray"; this.S_Name.applyGradient = false; this.S_Name.color = new Color(0.870588243f, 0.870588243f, 0.870588243f); this.S_TopLeft.gameObject.SetActive(false); this.S_Leftはがねおり.spriteName = "Hero_list_name_triangle_gray"; this.S_Rightはがねおり.spriteName = "Hero_list_name_triangle_gray"; } } else if (type == 2) { this.S_TopLeft.gameObject.SetActive(false); this.S_HeroTexture.material = null; this.S_Frame.GetComponent <UISprite>().spriteName = "Hero_list_frame_blue"; this.S_Name.applyGradient = true; this.S_Leftはがねおり.spriteName = "Hero_list_name_triangle"; this.S_Rightはがねおり.spriteName = "Hero_list_name_triangle"; } UIEventListener.Get(base.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickItem); this.SetSkinCount(heroID, heroMainData.skin_id); }
private void ShowCommon(SysHeroMainVo heroMain) { this.S_HeroTexture.mainTexture = ResourceManager.Load <Texture>(heroMain.Loading_icon, true, true, null, 0, false); this.S_HeroTexture.material = CharacterDataMgr.instance.ReturnMaterialType(1); this.S_Name.text = LanguageManager.Instance.GetStringById(heroMain.name); this.S_Name.gameObject.SetActive(true); this.S_Frame.gameObject.SetActive(true); this.S_Center.gameObject.SetActive(true); }
public void Play(int _uniqId, string _npcId, float _time) { this.cMgr.StartCoroutine(this.Timer(_uniqId, _time), true); SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(_npcId); if (heroMainData != null) { this.enemyIcon.spriteName = heroMainData.avatar_icon; } }
public static bool GetHeroMainVo(string heroID, out SysHeroMainVo vo) { vo = null; if (!string.IsNullOrEmpty(heroID)) { vo = BaseDataMgr.instance.GetHeroMainData(heroID); if (vo == null) { Reminder.ReminderStr("SysHeroMainVo is Null heroID=" + heroID); } } return(vo != null); }
private void RefreshUI_heroName() { SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.MemInfo.GetHeroId()); if (heroMainData != null) { this.lb_heroName.text = LanguageManager.Instance.GetStringById(heroMainData.name); } else { this.lb_heroName.text = string.Empty; } }
public void Init(EditorUnit unit) { this.self = unit; if (this.self.Unit is Hero) { this.data = BaseDataMgr.instance.GetHeroMainData(this.self.Unit.npc_id); if (this.data != null) { this.InitAttacks(); this.InitSkills(); } } }
public void UpdateInfo(HeroData data, VictPlayerType type, VictPlayerData playerData, bool isSelf = false) { isSelf = playerData.IsControlPlayer; this.P_HeroLevel.text = data.LV.ToString(); SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(data.HeroID); if (LevelManager.Instance.IsPvpBattleType) { this.P_SummonerName.text = playerData.SummonerName; } else { this.P_SummonerName.text = LanguageManager.Instance.GetStringById(heroMainData.name); } this.SetIsHighestKillHero(playerData.isHighestKillHero); this.SetIsHighestKillMonster(playerData.isHighestKillMonster); this.P_KillHero.text = playerData.KillHero.ToString(); this.P_KillMonster.text = playerData.KillMonster.ToString(); this.P_Kill.text = "/" + playerData.Death.ToString(); this.P_KillAssist.text = "/" + playerData.KillAssist.ToString(); if (isSelf) { this.P_SummonerName.color = new Color(0.9647059f, 0.9019608f, 0.360784322f); } else { this.P_SummonerName.color = Color.white; } if (playerData.LastChamRank <= 50) { this.P_SummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(playerData.LastChamRank); } if (playerData.SelfIsDeath) { if (this.P_BG2 != null) { this.P_BG2.gameObject.SetActive(true); } if (this.LeftDeathTimeLabel != null) { this.LeftDeathTimeLabel.text = playerData.LeftDeathTime.ToString(); } } else if (this.P_BG2 != null) { this.P_BG2.gameObject.SetActive(false); } this.CheckEquipment(playerData); }
protected override void Awake() { this.AutoStart = base.GO.GetComponent <AutoStart>(); this.Unit = base.GO.GetComponent <Units>(); this.Unit.npc_id = this.AutoStart.npc_id; if (this.Unit is Hero) { this.data = BaseDataMgr.instance.GetHeroMainData(this.Unit.npc_id); } base.GO.layer = LayerMask.NameToLayer("Unit"); this.collider = base.GO.AddComponent <CapsuleCollider>(); this.collider.height = 2f; this.collider.center = Vector3.up * 2f; this.MoveController = this.AddEditorComponet <EditorMoveController>(); this.AnimController = this.AddEditorComponet <EditorAnimationController>(); this.SkillManager = this.AddEditorComponet <EditorSkillManager>(); this.BuffManager = this.AddEditorComponet <EditorBuffManager>(); }