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]); } }
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); }