本文整理汇总了C#中Input.mouseup方法的典型用法代码示例。如果您正苦于以下问题:C# Input.mouseup方法的具体用法?C# Input.mouseup怎么用?C# Input.mouseup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Input
的用法示例。
在下文中一共展示了Input.mouseup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnRaycastHitchanged
public bool OnRaycastHitchanged(Input input, QbMatrix matrix, RaycastHit hit, ref Colort color, MouseButtonEventArgs e)
{
lastmatrix = matrix;
switch (state)
{
case ToolState.Start:
if ((e != null && e.IsPressed && e.Button == MouseButton.Left) || (e == null && input.mousedown(MouseButton.Left)))
{
state = ToolState.Base;
Singleton<Raycaster>.INSTANCE.testdirt = true;
startPosition = new VoxelLocation(hit, false);
endPosition = new VoxelLocation(hit, false);
volume = new VoxelVolume(startPosition, endPosition);
modifiedVoxels.Clear();
EnumerateVolume(volume, lastvolume, matrix, ref color, modifiedVoxels);
lastvolume = volume;
return true;
}
break;
case ToolState.Base:
if ((e != null && e.IsPressed && e.Button == MouseButton.Left) || (e == null && input.mousedown(MouseButton.Left)))
{
endPosition = new VoxelLocation(hit, false);
volume = new VoxelVolume(startPosition, endPosition);
EnumerateVolume(volume, lastvolume, matrix, ref color, modifiedVoxels);
CleanLastVolume(lastvolume, volume, matrix, modifiedVoxels);
lastvolume = volume;
return true;
}
else if ((e != null && !e.IsPressed && e.Button == MouseButton.Left) || (e == null && input.mouseup(MouseButton.Left)))
{
state = ToolState.Start;
lastvolume = VoxelVolume.NEGATIVE_ZERO;
Singleton<UndoRedo>.INSTANCE.AddUndo(BrushType, matrix, volume, color, modifiedVoxels);
return true;
}
break;
case ToolState.Limit:
break;
}
return false;
}