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