您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

36 行
719 B

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.RMGUI;
namespace RMGUI.GraphView
{
public class MouseManipulator : Manipulator
{
public List<ManipActivator> activators { get; private set; }
private ManipActivator m_currentActivator;
public MouseManipulator()
{
activators = new List<ManipActivator>();
}
protected bool CanStartManipulation(Event evt)
{
foreach (var activator in activators)
{
if (activator.Matches(evt))
{
m_currentActivator = activator;
return true;
}
}
return false;
}
protected bool CanStopManipulation(Event evt)
{
return ((MouseButton)evt.button == m_currentActivator.button) && this.HasCapture();
}
}
}