public override void OnVoxelsSelected(List <VoxelHandle> voxels, InputManager.MouseButton button) { if (!Dragging) { } else { if (button == InputManager.MouseButton.Left) { if (CanPlace) { RailHelper.Place(World, PreviewBodies, GodModeSwitch); } else { foreach (var piece in PreviewBodies) { piece.GetRoot().Delete(); } } PreviewBodies.Clear(); PathVoxels.Clear(); Dragging = false; } } }
public override void OnVoxelsSelected(List <VoxelHandle> voxels, InputManager.MouseButton button) { if (button == InputManager.MouseButton.Left) { if (RailHelper.CanPlace(Player, PreviewBodies)) { RailHelper.Place(Player, PreviewBodies, GodModeSwitch); PreviewBodies.Clear(); CreatePreviewBodies(Player.World.ComponentManager, Player.VoxSelector.VoxelUnderMouse); } } }