资源简介
PipeNet Visualize pipe networks and do some related analyses in Unity3D
代码片段和文件信息
using UnityEditor;
using UnityEngine;
public class MyHandles
{
// internal state for DragHandle()
static int s_DragHandleHash = “DragHandleHash“.GetHashCode();
static Vector2 s_DragHandleMouseStart;
static Vector2 s_DragHandleMouseCurrent;
static Vector3 s_DragHandleWorldStart;
static float s_DragHandleClickTime = 0;
static int s_DragHandleClickID;
static float s_DragHandleDoubleClickInterval = 0.5f;
static bool s_DragHandleHasMoved;
// externally accessible to get the ID of the most recently processed DragHandle
public static int lastDragHandleID;
public enum DragHandleResult
{
None = 0
LMBPress
LMBClick
LMBDoubleClick
LMBDrag
LMBRelease
RMBPress
RMBClick
RMBDoubleClick
RMBDrag
RMBRelease
};
public static Vector3 DragHandle(Vector3 position float handleSize Handles.DrawCapFunction capFunc Color colorSelected out DragHandleResult result)
{
int id = GUIUtility.GetControlID(s_DragHandleHash FocusType.Passive);
lastDragHandleID = id;
Vector3 screenPosition = Handles.matrix.MultiplyPoint(position);
Matrix4x4 cachedMatrix = Handles.matrix;
result = DragHandleResult.None;
switch (Event.current.GetTypeForControl(id))
{
case EventType.MouseDown:
if (HandleUtility.nearestControl == id && (Event.current.button == 0 || Event.current.button == 1))
{
GUIUtility.hotControl = id;
s_DragHandleMouseCurrent = s_DragHandleMouseStart = Event.current.mousePosition;
s_DragHandleWorldStart = position;
s_DragHandleHasMoved = false;
Event.current.Use();
EditorGUIUtility.SetWantsMouseJumping(1);
if (Event.current.button == 0)
result = DragHandleResult.LMBPress;
else if (Event.current.button == 1)
result = DragHandleResult.RMBPress;
}
break;
case EventType.MouseUp:
if (GUIUtility.hotControl == id && (Event.current.button == 0 || Event.current.button == 1))
{
GUIUtility.hotControl = 0;
Event.current.Use();
EditorGUIUtility.SetWantsMouseJumping(0);
if (Event.current.button == 0)
result = DragHandleResult.LMBRelease;
else if (Event.current.button == 1)
result = DragHandleResult.RMBRelease;
if (Event.current.mousePosition == s_DragHandleMouseStart)
{
bool doubleClick = (s_DragHandleClickID == id) &&
(Time.realtimeSinceStartup - s_DragHandleClickTime < s_DragHandleDoubleClickInterval);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-24 12:03 PipeNet-master\
目录 0 2019-01-24 12:03 PipeNet-master\Assets\
文件 191 2019-01-24 12:03 PipeNet-master\Assets\PipeNet.me
目录 0 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\
文件 191 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets.me
目录 0 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\
文件 191 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor.me
目录 0 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor\
文件 5828 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor\MyHandles.cs
文件 262 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor\MyHandles.cs.me
文件 18830 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor\NetComponentEditor.cs
文件 262 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Editor\NetComponentEditor.cs.me
文件 191 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials.me
目录 0 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\
文件 4260 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Block.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Block.mat.me
文件 191 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles.me
目录 0 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\
文件 4976 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\ClosedValve.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\ClosedValve.mat.me
文件 4976 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\RepairPoint.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\RepairPoint.mat.me
文件 4976 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\TroublePoint.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\Particles\TroublePoint.mat.me
文件 5048 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PipeLine.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PipeLine.mat.me
文件 5052 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PipeNetPlane.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PipeNetPlane.mat.me
文件 5012 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PointData_Common.mat
文件 179 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PointData_Common.mat.me
文件 5112 2019-01-24 12:03 PipeNet-master\Assets\PipeNet\Assets\Materials\PointData_Source.mat
............此处省略122个文件信息
- 上一篇:c# 串口通讯的(收发数据)
- 下一篇:WPF绘制坐标系(可放大缩小)
相关资源
- C# 朗读文本文字(SpeechSynthesizer)
- CSharp language specification 5.0中文(C# 语
- Tcp/ip socket 服务器/客户端
- TCP/IP通讯 (附服务端以及客户端)
- 局域网IP扫描工具及源码
-
C# 开发BHO(Browser Helper ob
ject)插件 - C# SIP
- udp通讯(需修改客户端链接服务端时
- C#游戏辅助helper类[内存多级指针读写
- C#版飞鸽传书
- HMI-with-WPF-part-3-Communication-with-multipl
- 松下PLC与C#通讯串口调试入门教程.z
- SuperPuTTY-1.4.0.8.zip
- C# 使用GDI+绘制漂亮的ToolTip控件
- Rony.DotNetCore.Solution.zip
- c#使用openoffice组件操作文件
- C# 监测服务器使用情况CPU、内存、硬
- zw_ASP.NET通用权限管理系统源代码含文
-
cef_binary_32_64双版包和pepflashpla
yer. - 24652561RevitWPFAddin.zip
- C#实现将WPF字体呈现到OpenGL 支持汉字
- C# 24个经典小游戏源码.zip
- C#实现封装SPC过程能力工具类ProcessC
- 自动搜索代理IP的浏览器(再次废弃)
- IP地址控件C#版
- LMI3D相机连接LMIHalconAcqTest.zip
- MaterialDesignInDome.zip
- de4dot-强大C#DLL反编译反混淆工具.zip
- C# PIng IP
- csharp免注册调用大漠插件.zip
评论
共有 条评论