private void activateBlockInfo(){
			FileManagerBlock block = selector.getSelectedBlock ();

			switch (block.state) {
			case BlockState.AllocateData:
				currentPanel = dataInfo;
				dataPanel.init (block.allocatedBytes);
				break;
			case BlockState.BitmapData:
				currentPanel = bitmapInfo;
				bitmapPanel.init ("Mapped Data blocks", gameLogic.getDataBitmaps());
				break;
			case BlockState.BitmapInode:
				currentPanel = bitmapInfo;
				bitmapPanel.init ("Mapped Inodes", gameLogic.getInodeBitmaps());
				break;
			case BlockState.Empty:
				currentPanel = dataInfo;
				dataPanel.init (block.allocatedBytes);
				break;
			case BlockState.Inode:
				currentPanel = inodeInfo;
				inodePanel.init (block.inodes);
				break;
			case BlockState.SuperBlock: 
				currentPanel = superBlockinfo;
				break;
			}

			currentPanel.SetActive (true);
		}
예제 #2
0
 private void hoverNewSegment(RaycastHit hit)
 {
     lastCollider   = hit.collider;
     lastHoverBlock = hit.collider.GetComponent <FileManagerBlock> ();
     lastHoverBlock.hover();
     foreach (BlockInfoUI infoBlock in infoUI)
     {
         infoBlock.displayNewFileBlock(lastHoverBlock);
     }
     hasLastHoverSeg = true;
 }
        public void removeFile(int inodeNumber)
        {
            bitmapInode.Remove(inodeNumber);
            FileManagerBlock inodeBlock = getMatchingInodeBlock(inodeNumber);

            inodeBlock.freeInode(inodeNumber);

            foreach (int block in inodeBlock.getInodeInformation(inodeNumber).allocatedBlocks)
            {
                FileManagerGameMaster.getBlock(block).setState(BlockState.Empty);
                bitmapData.Remove(block);
            }

            InodeInformation newInfo = new InodeInformation(inodeNumber);

            getMatchingInodeBlock(inodeNumber).setInodeInformation(inodeNumber, newInfo);
            UIOverlord.dataChanged();
        }
예제 #4
0
 public void setStartSelect(FileManagerBlock firstSelect)
 {
     lastSelectBlock = firstSelect;
 }