public void OpenColorPicker() { if (colPickerOpen) { colorPicker.transform.SetAsLastSibling(); } else { colPickerOpen = true; colorPicker = Instantiate(UIManager.instance.colorPickerPrefab, UIManager.instance.gameWindowContainer); colorPicker.Open(myColor, SetMarkerColor, CloseColorPicker); } }
// Colouring Walls public void BeginPaintingWalls() { if (paintingWalls) { return; } if (isMouseOccupied) { FreeMouse(); } paintingWalls = true; isMouseOccupied = true; wallColorPicker = Instantiate(UIManager.instance.colorPickerPrefab, UIManager.instance.gameWindowContainer); wallColorPicker.Open(paintColor, SetPaintColor, CancelPaintingWalls); }