Exemplo n.º 1
0
 public override void OnDisable()
 {
     base.OnDisable();
     touchListener.selectType = VoxelElement.FACES;
     voxelArray.ClearStoredSelection();
     voxelArray.ClearSelection();
 }
Exemplo n.º 2
0
    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();
            }
        }
    }
Exemplo n.º 3
0
 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);
         }
     }
 }