private void DoProgramBlockShiftRightWhenHover(int startZoneIndex) { if (!IsStackMoveZoneEmpty()) { StackItemMoveZone item = _stackMoveZones.Pop(); MoveSnappedBlock(item.To, item.From, false); } IncreaseZoneHeight(startZoneIndex); _tempPositionObjects.Insert(startZoneIndex, CreateTemporaryPositionObject(GetGameObjectBySnapIndex(startZoneIndex).transform.position)); ClearStackMoveZone(); ShiftRight(startZoneIndex); PrintBlockStates(); }
private void DoProgramBlockShiftRevert(int startZoneIndex) { Debug.Log("DoProgramBlockShiftRevert"); // Debug.Log("DoProgramBlockShiftRevert at index " + startZoneIndex); // printStack(); // Remove all temporary position objects DestroyAllTemporaryPositionObjects(); // Set all VRTK_SnapDropZone to default height for (var i = 0; i < _zones.Count; i++) { DecreaseZoneHeight(i); } // Move all snapped blocks back to original position while (!IsStackMoveZoneEmpty()) { StackItemMoveZone item = _stackMoveZones.Pop(); MoveSnappedBlock(item.To, item.From, false); } PrintBlockStates(); }