public IEnumerator DuelCCImplement() { DuelSkillObject = DuelDataCardSet.skill_obj; if (DuelCCSetBlock == null) { DuelCCSetBlock = transform.root.parent.Find("Canvas/BlockLayout/DuelCardBlock").gameObject.GetComponent <CCardBockCtl>(); } if (DuelCCSetStand == null) { DuelCCSetStand = transform.root.parent.Find("StandLayer/DuelStand").gameObject.GetComponent <CCardStandCtl>(); } DuelCCSetBlock.level = DuelCC_Level; DuelCCSetBlock.is_self = 0; DuelCCSetStand.is_self = 0; StartCoroutine(DuelCCSetBlock.InitCCImg(DuelDataSet, DuelDataCardSet)); StartCoroutine(DuelCCSetBlock.InitCCLvFrame()); StartCoroutine(DuelCCSetBlock.InitEquSetting(duel_atk_equ, duel_def_equ)); StartCoroutine(DuelCCSetStand.InitCCImg(DuelDataCardSet)); StartCoroutine(DuelCCSetSkill.InitCCImg2(DuelSkillObject)); StartCoroutine(DuelCCSetPhase.InitCCImg2(DuelDataCardSet)); yield return(true); }
public IEnumerator SelfCCImplement() { SelfSkillObject = SelfDataCardSet.skill_obj; if (SelfCCSetBlock == null) { SelfCCSetBlock = transform.root.parent.Find("Canvas/BlockLayout/CardBlock").gameObject.GetComponent <CCardBockCtl>(); } if (SelfCCSetStand == null) { SelfCCSetStand = transform.root.parent.Find("StandLayer/SelfStand").gameObject.GetComponent <CCardStandCtl>(); } SelfCCSetBlock.level = SelfCC_Level; SelfCCSetBlock.is_self = 1; SelfCCSetStand.is_self = 1; // SelfCCSetStand_v2.is_self = 1; StartCoroutine(SelfCCSetBlock.InitCCLvFrame()); StartCoroutine(SelfCCSetBlock.InitEquSetting(self_atk_equ, self_def_equ)); StartCoroutine(SelfCCSetBlock.InitCCImg(SelfDataSet, SelfDataCardSet)); StartCoroutine(SelfCCSetStand.InitCCImg(SelfDataCardSet)); StartCoroutine(SelfCCSetSkill.InitCCImg2(SelfSkillObject)); StartCoroutine(SelfCCSetPhase.InitCCImg2(SelfDataCardSet)); yield return(true); }
public IEnumerator StartSelfCCImplement(AssetBundle abs) { if (abs == null) { yield return(null); } TextAsset ta = abs.LoadAsset("card_set.json") as TextAsset; TextAsset ska = abs.LoadAsset("skill.json") as TextAsset; this.DataSet = JsonConvert.DeserializeObject <CardObject>(ta.text); for (int i = 0; i < this.DataSet.card_set.Count; i++) { if (this.DataSet.card_set[i].level == this.Level) { // this.DataCardSet = this.DataSet.card_set[i]; break; } } List <SkillObject> tmp_sk = JsonConvert.DeserializeObject <List <SkillObject> >(ska.text); List <int> sumd = new List <int>(); foreach (int d in DataCardSet.skill_pointer) { if (!sumd.Contains(d)) { sumd.Add(d); } } List <SkillObject> skj = new List <SkillObject>(); foreach (var tt in sumd) { foreach (var y in tmp_sk) { if (y.id == tt && !skj.Contains(y)) { skj.Add(y); } } } SkillObject = skj; if (this.Block == null) { this.Block = this.transform.root.parent.Find( "Canvas/BlockLayout/CardBlock" ).gameObject.GetComponent <CCardBockCtl>(); } if (this.StandCtl == null) { this.StandCtl = this.transform.root.parent.Find( "Canvas/StandImgLayout/SelfStand" ).gameObject.GetComponent <CCardStandCtl>(); } this.Block.level = this.Level; this.Block.is_self = 1; this.StandCtl.is_self = 1; StartCoroutine(this.Block.InitCCLvFrame()); StartCoroutine(this.Block.InitEquSetting(atk_equ, def_equ)); StartCoroutine(this.Block.InitCCImg(abs, this.DataSet, this.DataCardSet)); StartCoroutine(this.StandCtl.InitCCImg(abs, this.DataCardSet)); StartCoroutine(this.Skill.InitCCImg(abs, this.SkillObject)); StartCoroutine(this.Phase.InitCCImg(abs, this.DataCardSet)); yield return(true); }