Merge branch 'bugfix/fadein' into 'develop'
timeline指令 See merge request aibis-dream/aibis-dream!261
This commit is contained in:
@@ -10,16 +10,27 @@ namespace AibisDream.FixSystem
|
||||
|
||||
private IState _curState;
|
||||
private string _curArgs;
|
||||
|
||||
public FixStateMachine()
|
||||
{
|
||||
// 初始化为一个默认状态
|
||||
_curState = CreateState(FixState.Default, "");
|
||||
}
|
||||
// 初始化为一个默认状态
|
||||
_curState = CreateState(FixState.Default, "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 播放诊所到场景的timeline
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerator PlayClinicCut()
|
||||
{
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.CoolingMachine);
|
||||
yield return TimelineManager.Instance.PlayTimeline("ToBodyModule");
|
||||
}
|
||||
|
||||
public IEnumerator SwitchState(FixState nextState, string args = "")
|
||||
{
|
||||
if (CurState == nextState) yield break;
|
||||
|
||||
|
||||
_curArgs = args;
|
||||
|
||||
yield return _curState?.Exit();
|
||||
@@ -28,8 +39,7 @@ namespace AibisDream.FixSystem
|
||||
// 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);
|
||||
@@ -141,7 +151,7 @@ namespace AibisDream.FixSystem
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public struct GearState : IState
|
||||
{
|
||||
@@ -266,6 +276,7 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.BodyModule);
|
||||
}
|
||||
|
||||
// 插头回到初始插孔
|
||||
bodyModuleSystem.ResetPlug();
|
||||
// 切换相机
|
||||
|
||||
@@ -19,5 +19,11 @@ namespace AibisDream.FixSystem
|
||||
|
||||
yield return FixSystemCenter.StateMachine.SwitchState(targetState, extraArg);
|
||||
}
|
||||
|
||||
[YarnCommand("play_clinic_cut")]
|
||||
public static IEnumerator PlayClinicCut()
|
||||
{
|
||||
yield return FixSystemCenter.StateMachine.PlayClinicCut();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user