public BoardIcon GenerateIcon(int pX, int pY, Icon pIconData) { GameObject tNewIcon = Instantiate(m_PrefabBaseIconSetting, m_BoardRoot); tNewIcon.name = pIconData.Tag; BoardIcon tBoardIcon = InitBoardIcon(ref tNewIcon, pX, pY); tBoardIcon.SetBoardData(pIconData); return(tBoardIcon); }
public BoardIcon GenerateRandomIcon(int pX, int pY) { int tRandoIndex = UnityEngine.Random.Range(0, m_Icons.Count); Icon tIcon = m_Icons[tRandoIndex]; GameObject tNewIcon = Instantiate(m_PrefabBaseIconSetting, m_BoardRoot); tNewIcon.name = tIcon.Tag; BoardIcon tBoardIcon = InitBoardIcon(ref tNewIcon, pX, pY); tBoardIcon.SetBoardData(tIcon); return(tBoardIcon); }