public IEnumerator Init() { mCheePonGameView = YarLiongFactory.GetGameView(GameType.Gomoku) as ICheePonGameView; mGomokuCheePon = new GomokuCheePon(15, 15); mCheePonGameView.SetListener(this); yield return(mCheePonGameView.Init()); }
public void SetCheePon(ICheePon cheePonData, ICheePonNodeListener cheePonNodeListener) { mCheePonData = cheePonData as GomokuCheePon; var allNodes = mCheePonData.AllNodes; if (mAllNodeView == null) { mAllNodeView = new GomokuNodeView[allNodes.GetLength(0), allNodes.GetLength(1)]; } for (int j = 0; j < allNodes.GetLength(1); ++j) { for (int i = 0; i < allNodes.GetLength(0); ++i) { if (mAllNodeView[i, j] == null) { var nodeView = Instantiate(m_GomokuNodeView, m_GridLayoutGroup.transform); mAllNodeView[i, j] = nodeView; } mAllNodeView[i, j].SetNode(allNodes[i, j]); mAllNodeView[i, j].SetListener(cheePonNodeListener); mAllNodeView[i, j].gameObject.SetActive(true); } } }