コード例 #1
0
    GameObject AddBeautyFilterOptions(Beauty beautyitem)
    {
        GameObject option = Instantiate(BeautyFilter_UIExample);

        option.transform.SetParent(BeautyOptionContentTrans, false);
        option.transform.localScale    = Vector3.one;
        option.transform.localPosition = Vector3.zero;
        option.name = beautyitem.name;
        option.GetComponentInChildren <Text>().text    = beautyitem.name;
        option.GetComponentInChildren <Image>().sprite = uisprites.GetSprite(ItemType.Beauty, beautyitem.iconid_0);

        if (BeautyGOs.ContainsKey(beautyitem))
        {
            BeautyGOs.Remove(beautyitem);
        }
        BeautyGOs.Add(beautyitem, option);
        option.GetComponent <AddClickEvent>().AddListener(delegate(GameObject go)
        {
            if (go != currentSelected)
            {
                currentSelected = go;
                foreach (var bgo in BeautyGOs)
                {
                    bgo.Value.transform.Find("Image_bg").gameObject.SetActive(false);
                }
                go.transform.Find("Image_bg").gameObject.SetActive(true);
            }
            rtt.SetItemParams(BeautySkinItemName, "filter_name", beautyitem.paramword);
        });
        return(option);
    }
コード例 #2
0
    IEnumerator LoadBeautyBundle()
    {
        var tempslot = rtt.GetSlotIDbyName(ItemConfig.beautySkin[0].name);

        yield return(rtt.LoadItem(ItemConfig.beautySkin[0], (int)SlotForItems.Beauty));

        if (tempslot < 0)
        {
            for (int i = 0; i < BeautyConfig.beautySkin_1.Length; i++)
            {
                rtt.SetItemParamd(BeautySkinItemName, BeautyConfig.beautySkin_1[i].paramword, BeautyConfig.beautySkin_1[i].defaultvalue);
            }
            for (int i = 0; i < BeautyConfig.beautySkin_2.Length; i++)
            {
                rtt.SetItemParamd(BeautySkinItemName, BeautyConfig.beautySkin_2[i].paramword, BeautyConfig.beautySkin_2[i].defaultvalue);
            }
            rtt.SetItemParams(BeautySkinItemName, "filter_name", BeautyConfig.beautySkin_3[2].paramword);
            rtt.SetItemParamd(BeautySkinItemName, "filter_level", BeautyConfig.beautySkin_3[2].defaultvalue);
        }
    }