void OnEnable() { BlockEditor = new BlockEditor(); BlockEditor.Init(); GUIBoard = new GUIBoard(width, height); GUIBoard.InitBoard(BlockEditor); }
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; } } }