private void AddMazeGrid() { GameObject goMazeGrid = preFactory.GetMazeGrid(); CSGameObject.AddChildResetPos(goMazeGrid, _goGridPanel); scrGrid = goMazeGrid.GetComponent <SCRGrid>(); }
private void AddMazePlayer() { GameObject goMazePlayer = preFactory.GetMazePlayer(); CSGameObject.AddChildGO(goMazePlayer, this.gameObject); scrPlayer = goMazePlayer.GetComponent <SCRPlayer>(); scrPlayer.Init(this, scrGrid.firstPos); }
private void AddMazeGrid() { GameObject goMazeGrid = preFactory.GetMazeGrid(); CSGameObject.AddChildResetPos(goMazeGrid, this.gameObject); scrGrid = goMazeGrid.GetComponent <SCRGrid>(); LoadMap(); }
private SCRBlock CreateOneBlock(int index) { GameObject goBlock = preFactory.CreateMazeBlock(); CSGameObject.AddChildGO(goBlock, this.gameObject); goBlock.name += "_" + index; SCRBlock scr = goBlock.GetComponent <SCRBlock>(); scr.Init(this, index); if (onClickBlock != null) { scr.onClickBlock += onClickBlock; } return(scr); }