You've already forked taptap2024_GJ_chidouren
init
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace XFFSM
|
||||
{
|
||||
public class GraphLayer
|
||||
{
|
||||
|
||||
#region 字段
|
||||
|
||||
protected Rect position;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 属性
|
||||
|
||||
public EditorWindow EditorWindow { get; private set; }
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 方法
|
||||
|
||||
public GraphLayer(EditorWindow editorWindow) {
|
||||
this.EditorWindow = editorWindow;
|
||||
}
|
||||
|
||||
public virtual void OnGUI(Rect rect) {
|
||||
position = rect;
|
||||
UpdateTransformationMatrix();
|
||||
}
|
||||
|
||||
public virtual void ProcessEvents() {
|
||||
|
||||
}
|
||||
|
||||
public virtual void Update() { }
|
||||
|
||||
private void UpdateTransformationMatrix()
|
||||
{
|
||||
//this.transormMatrix = Matrix4x4.TRS(position.center + this.Context.DragOffset , Quaternion.identity,Vector3.one * this.Context.ZoomFactor);
|
||||
}
|
||||
|
||||
public virtual void OnLostFocus()
|
||||
{
|
||||
if (UnityEditor.EditorWindow.mouseOverWindow != null && UnityEditor.EditorWindow.mouseOverWindow.GetType().ToString().Equals("UnityEditor.InspectorWindow"))
|
||||
return;
|
||||
Context.Instance.ClearSelections();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user