clinic到bodymodule才触发timeline,加一些镜头转换设定,修复佩佩场景bug

This commit is contained in:
2025-02-15 00:04:44 +08:00
parent 877ec0627f
commit 382687055f
4 changed files with 43 additions and 8 deletions
@@ -35,3 +35,25 @@ MonoBehaviour:
m_PreInfinity: 0 m_PreInfinity: 0
m_PostInfinity: 0 m_PostInfinity: 0
m_RotationOrder: 0 m_RotationOrder: 0
- m_From: Cooling Camera
m_To: Body Module Camera
m_Blend:
m_Style: 0
m_Time: 2
m_CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 0
m_PostInfinity: 0
m_RotationOrder: 0
- m_From: Body Module Camera
m_To: Cooling Camera
m_Blend:
m_Style: 0
m_Time: 2
m_CustomCurve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 0
m_PostInfinity: 0
m_RotationOrder: 0
+5 -5
View File
@@ -447,7 +447,7 @@ SpriteRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 1134468525 m_SortingLayerID: 1134468525
m_SortingLayer: 10 m_SortingLayer: 10
m_SortingOrder: 5 m_SortingOrder: 6
m_Sprite: {fileID: 3822937466802405960, guid: fd04c28739017964789d58d573f9fabb, type: 3} m_Sprite: {fileID: 3822937466802405960, guid: fd04c28739017964789d58d573f9fabb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0 m_FlipX: 0
@@ -31451,8 +31451,8 @@ Transform:
m_GameObject: {fileID: 1822610249} m_GameObject: {fileID: 1822610249}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4.084, y: 0.591, z: 0} m_LocalPosition: {x: -4.136, y: 0.591, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.95581, y: 0.95581, z: 0.95581}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 2071292136} - {fileID: 2071292136}
@@ -34044,8 +34044,8 @@ Transform:
m_GameObject: {fileID: 2071292135} m_GameObject: {fileID: 2071292135}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: -0.078, y: -0.009, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 0.90277, y: 0.90277, z: 0.90277}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1434391375} - {fileID: 1434391375}
+1 -1
View File
@@ -8149,7 +8149,7 @@ MonoBehaviour:
- {fileID: 11400000, guid: 8d8b11f0c2fbc4d4cb8c2857d98383c9, type: 2} - {fileID: 11400000, guid: 8d8b11f0c2fbc4d4cb8c2857d98383c9, type: 2}
- {fileID: 11400000, guid: afc5b01ef301cc74db7cae741acad427, type: 2} - {fileID: 11400000, guid: afc5b01ef301cc74db7cae741acad427, type: 2}
- {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2} - {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2}
runMode: 2 runMode: 0
firstTalkSo: {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2} firstTalkSo: {fileID: 11400000, guid: ac5ca9a66ff22ab4b9cd5adbdade6b8c, type: 2}
testTalkSo: {fileID: 11400000, guid: 68a9c1b8c5230454bb9498fd2ab5714b, type: 2} testTalkSo: {fileID: 11400000, guid: 68a9c1b8c5230454bb9498fd2ab5714b, type: 2}
saveFileName: "PeipeiDay2_\u7B2C\u4E00\u6B21\u53D1\u70ED" saveFileName: "PeipeiDay2_\u7B2C\u4E00\u6B21\u53D1\u70ED"
+15 -2
View File
@@ -10,6 +10,11 @@ namespace AibisDream.FixSystem
private IState _curState; private IState _curState;
private string _curArgs; private string _curArgs;
public FixStateMachine()
{
// 初始化为一个默认状态
_curState = CreateState(FixState.Default, "");
}
public IEnumerator SwitchState(FixState nextState, string args = "") public IEnumerator SwitchState(FixState nextState, string args = "")
{ {
@@ -17,6 +22,14 @@ namespace AibisDream.FixSystem
yield return _curState?.Exit(); yield return _curState?.Exit();
// 检查当前状态和下一个状态
if (_curState.GetState == FixState.Clinic && nextState == FixState.BodyModule)
{
// 仅在从 Clinic 到 BodyModule 时执行这两行
yield return CameraKit.Instance.SwitchCamera(CameraEnum.CoolingMachine);
yield return TimelineManager.Instance.PlayTimeline("ToBodyModule");
}
GameLoopManager.Instance?.UpdateFixState(nextState, _curArgs); GameLoopManager.Instance?.UpdateFixState(nextState, _curArgs);
_curState = CreateState(nextState, _curArgs); _curState = CreateState(nextState, _curArgs);
yield return _curState.Enter(); yield return _curState.Enter();
@@ -83,6 +96,7 @@ namespace AibisDream.FixSystem
public IEnumerator Enter() public IEnumerator Enter()
{ {
// 切换相机 // 切换相机
yield return CameraKit.Instance.SwitchCamera(CameraEnum.CoolingMachine);
yield return CameraKit.Instance.SwitchCamera(CameraEnum.Clinic); yield return CameraKit.Instance.SwitchCamera(CameraEnum.Clinic);
} }
@@ -109,8 +123,6 @@ namespace AibisDream.FixSystem
// 拔出插头 // 拔出插头
bodyModuleSystem.ResetPlug(); bodyModuleSystem.ResetPlug();
// 切换相机 // 切换相机
yield return CameraKit.Instance.SwitchCamera(CameraEnum.CoolingMachine);
yield return TimelineManager.Instance.PlayTimeline("ToBodyModule");
yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule); yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule);
// 开启交互 // 开启交互
bodyModuleSystem.EnableSystem(); bodyModuleSystem.EnableSystem();
@@ -126,6 +138,7 @@ namespace AibisDream.FixSystem
yield break; yield break;
} }
} }
public struct GearState : IState public struct GearState : IState
{ {