示例#1
0
    public static bool CollectMahjongPai(MahjongPai pai)
    {
        if (pai == null)
        {
            return(false);
        }

        pai.Clear();

        if (poolRoot == null)
        {
            poolRoot = new GameObject("MahjongPoolRoot").transform;
        }

        pai.transform.parent = poolRoot;

        pai.gameObject.SetActive(false);
        _mahjongPaiPool.Add(pai.gameObject);

        return(true);
    }
示例#2
0
    public static bool CollectMahjongPai(MahjongPai pai)
    {
        if (pai == null)
        {
            return(false);
        }

        pai.Clear();

        if (poolRoot == null)
        {
            poolRoot = new GameObject("MahjongPoolRoot").transform;
        }

        pai.transform.parent = poolRoot;
        Utils.SetLayerRecursively(pai.gameObject, LayerMask.NameToLayer("Default"));
        pai.gameObject.SetActive(false);
        _mahjongPaiPool.Add(pai.gameObject);

        return(true);
    }