コード例 #1
0
    public void Set_Item(Roon_Info slot_)
    {
        info_ = slot_;

        img_roon = transform.Find("img_roon").GetComponent <Image>();
        img_plus = transform.Find("img_plus").GetComponent <Image>();
        img_lock = transform.Find("img_lock").GetComponent <Image>();

        img_roon.gameObject.SetActive(true);
        img_plus.gameObject.SetActive(false);
        img_lock.gameObject.SetActive(false);

        img_roon.sprite = Utill.Get_Roon_Sp(info_.type);

        GetComponent <Button>().onClick.RemoveAllListeners();
        GetComponent <Button>().onClick.AddListener(() => Open_Roon_Mount());
    }
コード例 #2
0
    public void Set_Item_Slot(Roon_Slot Slot_)
    {
        roon_Slot = Slot_;

        img_roon = transform.Find("img_roon").GetComponent <Image>();
        img_plus = transform.Find("img_plus").GetComponent <Image>();
        img_lock = transform.Find("img_lock").GetComponent <Image>();

        Debug.Log("roon_Slot " + roon_Slot.int_roon.type);

        img_roon.gameObject.SetActive(roon_Slot.int_roon.type != -1);
        img_plus.gameObject.SetActive(!roon_Slot.isLock && roon_Slot.int_roon.type.Equals(-1));
        img_lock.gameObject.SetActive(roon_Slot.isLock);

        img_roon.sprite = Utill.Get_Roon_Sp(roon_Slot.int_roon.type);

        GetComponent <Button>().onClick.RemoveAllListeners();
        GetComponent <Button>().onClick.AddListener(() => Open_Roon_Popup());
        GetComponent <Button>().interactable = !roon_Slot.isLock;
    }