Example #1
0
    public void OnYes()
    {
        if (ID == 0 && OpenType == "HeroData")
        {
            return;
        }
        switch (OpenType)
        {
        case "HeroData":
            GameObject.Find("Canvas/HeroData").GetComponent <HeroData>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "BasicInformation":
            DataManage.DelHeroMessage(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            transform.parent.Find("BasicInformation").GetComponent <BasicInformation>().RemoveUIData();
            break;

        case "StarGrow":
            GameObject.Find("Canvas/StarGrow").GetComponent <StarGrow>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "SkillConfig":
            GameObject.Find("Canvas/SkillConfig").GetComponent <SkillConfig>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "Fetter":
            GameObject.Find("Canvas/Fetter").GetComponent <Fetter>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "TalentSkill_Buff":
            GameObject.Find("Canvas/TalentSkill_Buff").GetComponent <TalentSkill_Buff>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "TalentSkill":
            GameObject.Find("Canvas/TalentSkill").GetComponent <TalentSkill>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "TalentStoneCondition":
            GameObject.Find("Canvas/TalentStoneCondition").GetComponent <TalentStoneCondition>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "TowerDefenseSkill":
            GameObject.Find("Canvas/TowerDefenseSkill").GetComponent <TowerDefenseSkill>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "BreakGrow":
            GameObject.Find("Canvas/BreakGrow").GetComponent <BreakGrow>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;

        case "FightSkill":
            GameObject.Find("Canvas/FightSkill").GetComponent <FightSkill>().Del(ID);
            transform.Find("DelTipWindow").gameObject.SetActive(false);
            break;
        }
    }