Пример #1
0
    private void AddMazeGrid()
    {
        GameObject goMazeGrid = preFactory.GetMazeGrid();

        CSGameObject.AddChildResetPos(goMazeGrid, _goGridPanel);
        scrGrid = goMazeGrid.GetComponent <SCRGrid>();
    }
Пример #2
0
    private void AddMazePlayer()
    {
        GameObject goMazePlayer = preFactory.GetMazePlayer();

        CSGameObject.AddChildGO(goMazePlayer, this.gameObject);
        scrPlayer = goMazePlayer.GetComponent <SCRPlayer>();
        scrPlayer.Init(this, scrGrid.firstPos);
    }
Пример #3
0
    private void AddMazeGrid()
    {
        GameObject goMazeGrid = preFactory.GetMazeGrid();

        CSGameObject.AddChildResetPos(goMazeGrid, this.gameObject);
        scrGrid = goMazeGrid.GetComponent <SCRGrid>();
        LoadMap();
    }
Пример #4
0
    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);
    }