public override void OnDisable() { base.OnDisable(); touchListener.selectType = VoxelElement.FACES; voxelArray.ClearStoredSelection(); voxelArray.ClearSelection(); }
protected void SelectionGUI() { if (voxelArray.SomethingIsAddSelected()) { if (ActionBarButton(GUIIconSet.instance.applySelection)) { voxelArray.StoreSelection(); } } if (voxelArray.SomethingIsStoredSelected()) { if (ActionBarButton(GUIIconSet.instance.clearSelection)) { voxelArray.ClearStoredSelection(); voxelArray.ClearSelection(); } } }
private void DeleteButton() { // TODO: only deselect deleted objects voxelArray.ClearSelection(); voxelArray.ClearStoredSelection(); foreach (Entity entity in selectedEntities) { if (entity is PlayerObject) { continue; } else if (entity is ObjectEntity) { voxelArray.DeleteObject((ObjectEntity)entity); voxelArray.unsavedChanges = true; } else if (entity is Substance) { voxelArray.DeleteSubstance((Substance)entity); } } }