示例#1
0
    public void PlayLightCard(int idx, GameObject obj, uint cardId, Transform selfParent, bool isSame = false)
    {
        obj.transform.SetParent(selfParent);
        SingleCard item = obj.GetComponent <SingleCard>();

        item.mCurStatus = ECardStatus.ELightCard;
        item.SetSprName(cardId, "small");
        item.PlayLightCardTween(obj, isSame, idx == 0);
        item.transform.GetChild(0).GetComponent <Image>().raycastTarget             = false;
        item.transform.GetChild(0).GetChild(0).GetComponent <Image>().raycastTarget = false;
        item.transform.GetChild(0).GetChild(1).GetComponent <Image>().raycastTarget = false;
    }
示例#2
0
    private GameObject SetLightCardInfo(uint cardId, GameObject lightCardItem, Transform parent)
    {
        lightCardItem.transform.SetParent(parent.GetChild(0));
        SingleCard item = lightCardItem.GetComponent <SingleCard>();

        item.mCurStatus = ECardStatus.ELightCard;
        item.SetSprName(cardId, "small");
        item.transform.GetChild(0).GetComponent <Image>().raycastTarget             = false;
        item.transform.GetChild(0).GetChild(0).GetComponent <Image>().raycastTarget = false;
        item.transform.GetChild(0).GetChild(1).GetComponent <Image>().raycastTarget = false;
        return(lightCardItem);
    }