diff options
author | chai <chaifix@163.com> | 2021-09-02 13:01:49 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-02 13:01:49 +0800 |
commit | adb364a79f5dd69de08f72072cc2261131314e53 (patch) | |
tree | c5037743a53d2f083cb5b07d8726fe48c1f06660 /Assets/ActionTool/Editor/ActionManager.cs | |
parent | 3ad68338dff5229d3fd8ec9f3ee994d7e37fb0ed (diff) |
+override rootmotion
Diffstat (limited to 'Assets/ActionTool/Editor/ActionManager.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionManager.cs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Assets/ActionTool/Editor/ActionManager.cs b/Assets/ActionTool/Editor/ActionManager.cs index 52311140..7c3f1df4 100644 --- a/Assets/ActionTool/Editor/ActionManager.cs +++ b/Assets/ActionTool/Editor/ActionManager.cs @@ -28,6 +28,7 @@ namespace ActionTool public static ActionEventEditor EventEditWindow;
public static ActionColliderFrameEditor ColliderFrameWindow;
public static ActionColliderEditor ColliderWindow;
+ public static ActionRootMotionEditor RootMotionEditor;
public static ActionToolSettings Settings;
@@ -115,12 +116,22 @@ namespace ActionTool private static GameObject s_RootActionTool;
private const string kRootActionTool = "RootActionTool";
- public const int kMaxEventsPerFrame = 10;
- public static int eventAndBoxCount
+ public static int MaxEventsPerFrame // 所有帧里面事件最多有几个
{
get
{
- return kMaxEventsPerFrame + (animationData != null ? animationData.GetBoxesCount() : 0);
+ if (animationData == null)
+ return 0;
+ return animationData.GetMaxAnimationEventsCount();
+ }
+ }
+
+ public static int GridRowCount
+ {
+ get
+ {
+ bool hasRM = animationData != null && animationData.overrideRootMotion != null;
+ return (MaxEventsPerFrame + 1) + (animationData != null ? animationData.GetBoxesCount() : 0) + (hasRM ? 1 : 0);
}
}
@@ -481,5 +492,10 @@ namespace ActionTool animationData.DeleteEvent(animEvent);
}
+ public static void EditRootMotionOverrideData()
+ {
+ RootMotionEditor = EditorWindow.GetWindow<ActionRootMotionEditor>(true);
+ }
+
}
}
\ No newline at end of file |