summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-09-11 11:37:35 +0800
committerchai <chaifix@163.com>2021-09-11 11:37:35 +0800
commit6d1a959a63407c38de4be2870bd0cf46a6d789c5 (patch)
treedddd6660ae0fe8463cb7ae8bd898206eab2c3f92
parent0c8c33be02dcaa2d569fc9bbdd9b217d9c30b8e4 (diff)
*action tool
-rw-r--r--Assets/ActionTool/Editor/ActionPreviewEditor.cs10
-rw-r--r--Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab6
2 files changed, 8 insertions, 8 deletions
diff --git a/Assets/ActionTool/Editor/ActionPreviewEditor.cs b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
index 4fd776cc..a305ad72 100644
--- a/Assets/ActionTool/Editor/ActionPreviewEditor.cs
+++ b/Assets/ActionTool/Editor/ActionPreviewEditor.cs
@@ -472,7 +472,7 @@ namespace ActionTool
float y = iy;
float contentHeight = ActionManager.GridRowCount * kFrameHeight + 40;
- Rect content = new Rect(0, 0, ((int)action.totalFrame + 1)* kFrameWidth + 30, contentHeight);
+ Rect content = new Rect(0, 0, ((int)Mathf.Ceil(action.totalFrame)) * kFrameWidth + 30, contentHeight);
float height = 300;
if (position.height - kTimeLineViewYOffset > contentHeight + 15)
height = contentHeight + 15;
@@ -497,7 +497,7 @@ namespace ActionTool
void GUI_FrameText(ref float y)
{
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Rect rect = new Rect(0, y, 20, 15);
for(int i = 0; i < sampleCount; i++)
{
@@ -538,7 +538,7 @@ namespace ActionTool
m_GridY = y;
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Rect bgRect = new Rect(kTimeLineViewXOffset, y, sampleCount * kFrameWidth, ActionManager.GridRowCount * kFrameHeight);
GUI.Box(bgRect, "");
@@ -701,7 +701,7 @@ namespace ActionTool
return;
ActionData action = ActionManager.actionData;
AnimationData animData = ActionManager.animationData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
float y = m_GridY + (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight + (animData.overrideRootMotion ? kFrameHeight : 0);
Vector2 position = e.mousePosition;
int boxCount = ActionManager.animationData.GetBoxesCount();
@@ -977,7 +977,7 @@ namespace ActionTool
return;
ActionData action = ActionManager.actionData;
- int sampleCount = (int)action.totalFrame + 1;
+ int sampleCount = (int)Mathf.Ceil(action.totalFrame);
Vector2 position = Event.current.mousePosition;
Rect eventRegion = new Rect(kTimeLineViewXOffset, m_GridY, sampleCount * kFrameWidth, (ActionManager.MaxEventsPerFrame + 1) * kFrameHeight);
if (!eventRegion.Contains(position))
diff --git a/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab b/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
index 4cf8a46c..48d2cff5 100644
--- a/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
+++ b/Assets/Bundle/Unit/PC/Erika/Prefabs/Erika_Robot.prefab
@@ -57,15 +57,15 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1357685695}
- m_LocalRotation: {x: -0.24720925, y: -0.40268856, z: 0.18871981, w: -0.86088}
- m_LocalPosition: {x: 0.1611, y: -0.1365, z: 0.21}
+ m_LocalRotation: {x: -0.26233202, y: -0.2770635, z: 0.24158631, w: -0.8922185}
+ m_LocalPosition: {x: 0.06, y: -0.161, z: 0.279}
m_LocalScale: {x: 0.01006957, y: 0.014763792, z: 0.9952188}
m_Children:
- {fileID: 2135912540}
- {fileID: 332159091}
m_Father: {fileID: 6930305872343221556}
m_RootOrder: 5
- m_LocalEulerAnglesHint: {x: 144.716, y: 227.31201, z: 171.132}
+ m_LocalEulerAnglesHint: {x: 142.988, y: 207.414, z: 159.033}
--- !u!33 &1357685700
MeshFilter:
m_ObjectHideFlags: 0