Example #1
0
        void OnEnable()
        {
            BlockEditor = new BlockEditor();
            BlockEditor.Init();

            GUIBoard = new GUIBoard(width, height);
            GUIBoard.InitBoard(BlockEditor);
        }
Example #2
0
        public void InitBoard(BlockEditor blockEditor)
        {
            entities = new GUIEntity[width, height];

            for (int i = 0; i < width; i++)
            {
                for (int j = 0; j < height; j++)
                {
                    GUIEntity e = new GUIEntity();
                    e.SetDefault();
                    e.EntityClicked += blockEditor.SetEntity;


                    entities[i, j] = e;
                    e.x            = i;
                    e.y            = j;
                }
            }
        }