From 22891bf59032ba88262824255a706d652031384b Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 10 Mar 2022 14:07:40 +0800 Subject: * move folder --- .../ActionTool/Editor/ActionColliderFrameEditor.cs | 109 --------------------- 1 file changed, 109 deletions(-) delete mode 100644 Assets/Tools/ActionTool/Editor/ActionColliderFrameEditor.cs (limited to 'Assets/Tools/ActionTool/Editor/ActionColliderFrameEditor.cs') diff --git a/Assets/Tools/ActionTool/Editor/ActionColliderFrameEditor.cs b/Assets/Tools/ActionTool/Editor/ActionColliderFrameEditor.cs deleted file mode 100644 index 4efd1f93..00000000 --- a/Assets/Tools/ActionTool/Editor/ActionColliderFrameEditor.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; - -namespace ActionTool -{ - - // 编辑collider帧 - public class ActionColliderFrameEditor : EditorWindow - { - EditorWindow sceneView; - - private void OnEnable() - { - titleContent = new GUIContent("Collider Frame Editor"); - maxSize = new Vector2(300, 180); - minSize = maxSize; - - if(!sceneView) - sceneView = EditorWindow.GetWindow(); - } - - private void OnDisable() - { - // sceneView = null; - ActionManager.OnSelectColliderFrame(null); - } - - private void Update() - { - } - - private void OnGUI() - { - var frame = ActionManager.editColliderFrame; - if (frame == null) - { - this.Close(); - return; - } - - GUI.changed = false; - - GUILayout.Space(5); - - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField("frame: "); - EditorGUILayout.LabelField(frame.frame.ToString()); - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField("active: "); - frame.active = EditorGUILayout.Toggle(frame.active); - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.LabelField("position: "); - frame.position = EditorGUILayout.Vector3Field("", frame.position); - - EditorGUILayout.LabelField("size: "); - frame.size = EditorGUILayout.Vector3Field("", frame.size); - - GUILayout.Space(10); - - GUILayout.BeginHorizontal(); - - if(GUILayout.Button("Left abit")) - { - ActionData action = ActionManager.actionData; - float normaltime = frame.frame / action.totalFrame; - action.curAnimTimeNormal = normaltime - 0.001f; - } - - if (GUILayout.Button("Right abit")) - { - ActionData action = ActionManager.actionData; - float normaltime = frame.frame / action.totalFrame; - action.curAnimTimeNormal = normaltime + 0.001f; - } - - if (GUILayout.Button("Current")) - { - ActionData action = ActionManager.actionData; - float normaltime = frame.frame / action.totalFrame; - action.curAnimTimeNormal = normaltime; - } - - GUILayout.EndHorizontal(); - - GUILayout.Space(10); - - Color prevColor = GUI.backgroundColor; - GUI.backgroundColor = Color.red; - if (GUILayout.Button("Delete")) - { - ActionManager.DeleteCurFrame(); - } - GUI.backgroundColor = prevColor; - - if (GUI.changed) - { - if (sceneView != null) - sceneView.Repaint(); - if (ActionManager.PreviewWindow != null) - ActionManager.PreviewWindow.Repaint(); - } - } - } -} \ No newline at end of file -- cgit v1.1-26-g67d0