Пример #1
0
    public BlockData(string strClass, string strLinkedList)
    {
        string[] SplitData = strClass.Split(';');
        int      iMax      = SplitData.Length;

        BlockClass = new MAP_BLOCK_CLASS[iMax];

        for (int i = 0; i < iMax; i++)
        {
            BlockClass[i] = (MAP_BLOCK_CLASS)Util.EnumChange <MAP_BLOCK_CLASS>(SplitData[i]);
        }

        SplitData       = strLinkedList.Split(';');
        iMax            = SplitData.Length;
        BlockLinkedList = new int[iMax];

        for (int i = 0; i < iMax; i++)
        {
            BlockLinkedList[i] = Util.ConvertToInt(SplitData[i]);
        }
    }
Пример #2
0
 private void Awake()
 {
     m_SelectObject = transform.GetChild(0).gameObject;
     m_BlockSprite  = transform.GetComponent <UISprite>();
     m_eClass       = (MAP_BLOCK_CLASS)Util.EnumChange <MAP_BLOCK_CLASS>(m_BlockSprite.spriteName);
 }