Exemplo n.º 1
0
    public override void SetRandomDir()
    {
        int seasonType = Random.Range(0, (int)SEASON_TYPE._MAX);

        KittyTotalObject.SetEffectUVList(m_listEffectUV[seasonType]);

        for (int i = 0; i < m_listKitty.Count; i++)
        {
            for (int j = 0; j < m_listKitty[i].Count; j++)
            {
                if (m_listKitty[i][j].GetComponent <KittyTotalObject>())
                {
                    int kittylevel             = Random.Range(0, m_dKittyLevelMax);
                    KittyTotalObject tmpScript = m_listKitty[i][j].GetComponent <KittyTotalObject>();

                    tmpScript.SetValid(false);
                    tmpScript.KittyLevel = kittylevel;
                    tmpScript.SetKittyHeadUVList(m_rectFaceUV[kittylevel]);
                    tmpScript.SetKittyLegUVList(m_rectLegUV[kittylevel]);
                    tmpScript.SetEffectUV();
                    tmpScript.SetKittyPos(i, j);
                    tmpScript.SetRotateType(Random.Range(0, DefineBaseManager.inst.KittyLegDir));
                }
            }
        }
    }
Exemplo n.º 2
0
    protected bool AddKittyObject(int _line, KittyTotalObject _AddObj)
    {
        if (_AddObj)
        {
            _AddObj.SetValid(false);

            if (m_listKitty.Count > _line)
            {
                m_listKitty[_line].Add(_AddObj);
            }
            else
            {
                List <KittyTotalObject> tmpList = new List <KittyTotalObject>();
                tmpList.Add(_AddObj);
                m_listKitty.Add(tmpList);
            }
        }

        return(SetLoadObjectLineY());
    }