public void SetEntity(GUIEntity entity, Event e) { CurrentlyEditedEntity = entity; if (Event.current.button == 1) { entity.SetDefault(); } }
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; } } }