예제 #1
0
    private void SelectCenterEquipTip(long equip_uuid, bool noEquip = false)
    {
        Transform transform = base.FindTransform("RightTip");

        if (transform.get_childCount() > 0)
        {
            EquipItemTipUI component = transform.GetChild(0).GetComponent <EquipItemTipUI>();
            component.GetComponent <EquipItemTipUI>().RefreshUI(equip_uuid, false, noEquip, false, 3000);
        }
        else
        {
            GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("EquipItemTipUI");
            instantiate2Prefab.get_transform().SetParent(transform);
            instantiate2Prefab.SetActive(true);
            instantiate2Prefab.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f));
            instantiate2Prefab.GetComponent <RectTransform>().set_localPosition(new Vector3(0f, 0f, 0f));
            instantiate2Prefab.GetComponent <EquipItemTipUI>().RefreshUI(equip_uuid, false, noEquip, false, 3000);
        }
    }
예제 #2
0
    private void SetHasEquipedTip(EquipLibType.ELT pos, bool isShowStrength = false)
    {
        Transform transform = base.FindTransform("LeftTip");
        EquipLib  equipLib  = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos);

        if (equipLib != null)
        {
            if (transform.get_childCount() > 0)
            {
                EquipItemTipUI component = transform.GetChild(0).GetComponent <EquipItemTipUI>();
                component.GetComponent <EquipItemTipUI>().RefreshUI(equipLib.wearingId, true, false, isShowStrength, 3000);
            }
            else
            {
                GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("EquipItemTipUI");
                instantiate2Prefab.get_transform().SetParent(transform);
                instantiate2Prefab.GetComponent <RectTransform>().set_localScale(new Vector3(1f, 1f, 1f));
                instantiate2Prefab.SetActive(true);
                instantiate2Prefab.GetComponent <RectTransform>().set_localPosition(new Vector3(0f, 0f, 0f));
                instantiate2Prefab.GetComponent <EquipItemTipUI>().RefreshUI(equipLib.wearingId, true, false, isShowStrength, 3000);
            }
        }
    }