存储功能测试
This commit is contained in:
@@ -30,11 +30,11 @@ namespace AibisDream.FixSystem
|
||||
public IEnumerator SwitchState(FixState nextState, string args = "")
|
||||
{
|
||||
if (CurState == nextState) yield break;
|
||||
|
||||
|
||||
_curArgs = args;
|
||||
|
||||
yield return _curState?.Exit();
|
||||
|
||||
|
||||
_curState = CreateState(nextState, _curArgs);
|
||||
|
||||
EnumEventSystem.Global.Send(EventEnum.FixStateSwitch, nextState);
|
||||
@@ -54,7 +54,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
FixState.Clinic => new ClinicState(),
|
||||
FixState.Engine => new EngineState(),
|
||||
FixState.CoolingMachine => new CoolingMachineState(),
|
||||
FixState.BodyModule => new BodyModuleState(),
|
||||
FixState.Memory => new MemoryState(),
|
||||
FixState.Eye => new EyeState(),
|
||||
@@ -72,7 +71,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
Default,
|
||||
Clinic,
|
||||
CoolingMachine,
|
||||
BodyModule,
|
||||
Memory,
|
||||
Eye,
|
||||
@@ -212,43 +210,6 @@ namespace AibisDream.FixSystem
|
||||
}
|
||||
}
|
||||
|
||||
public struct CoolingMachineState : IState
|
||||
{
|
||||
private bool _playLink;
|
||||
|
||||
public FixState GetState => FixState.CoolingMachine;
|
||||
|
||||
public void SetArgs(string args)
|
||||
{
|
||||
_playLink = !string.IsNullOrEmpty(args);
|
||||
}
|
||||
|
||||
public IEnumerator Enter()
|
||||
{
|
||||
var coolingSystem = FixSystemCenter.SystemDic.Get<CoolingSystem>();
|
||||
// 切相机
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.CoolingMachine);
|
||||
|
||||
// 打开泵机
|
||||
coolingSystem.gameObject.SetActive(true);
|
||||
yield return coolingSystem.OpenCoolingSystem();
|
||||
// 播放插线动画
|
||||
if (_playLink)
|
||||
{
|
||||
yield return coolingSystem.LinkTube();
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator Exit()
|
||||
{
|
||||
var cooling = FixSystemCenter.SystemDic.Get<CoolingSystem>();
|
||||
|
||||
yield return cooling.CloseBottleUI();
|
||||
yield return cooling.CloseCoolingSystem();
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
}
|
||||
|
||||
public struct UfState : IState
|
||||
{
|
||||
public FixState GetState => FixState.UF;
|
||||
@@ -260,8 +221,8 @@ namespace AibisDream.FixSystem
|
||||
public IEnumerator Enter()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var UFSystem = FixSystemCenter.SystemDic.Get<UFSystem>();
|
||||
var EyeSystem = FixSystemCenter.SystemDic.Get<EyeSystem>();
|
||||
var ufSystem = FixSystemCenter.SystemDic.Get<UFSystem>();
|
||||
var eyeSystem = FixSystemCenter.SystemDic.Get<EyeSystem>();
|
||||
// 先切BodyModule
|
||||
if (!CameraKit.Instance.EqualToCameraState(CameraEnum.BodyModule))
|
||||
{
|
||||
@@ -273,20 +234,20 @@ namespace AibisDream.FixSystem
|
||||
// 切换相机
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.UF);
|
||||
yield return MainUIController.Instance?.FadeInSync(0.5f);
|
||||
UFSystem.OpenUFView();
|
||||
ufSystem.OpenUFView();
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.EyeDeep);
|
||||
EyeSystem.OnEnter();
|
||||
eyeSystem.OnEnter();
|
||||
yield return MainUIController.Instance?.FadeOutSync(0.5f);
|
||||
}
|
||||
|
||||
public IEnumerator Exit()
|
||||
{
|
||||
float duration = 0.5f;
|
||||
var UFSystem = FixSystemCenter.SystemDic.Get<UFSystem>();
|
||||
var ufSystem = FixSystemCenter.SystemDic.Get<UFSystem>();
|
||||
var eyeSystem = FixSystemCenter.SystemDic.Get<EyeSystem>();
|
||||
yield return MainUIController.Instance?.FadeInSync(duration);
|
||||
eyeSystem.OnExit();
|
||||
UFSystem.CloseUFView();
|
||||
ufSystem.CloseUFView();
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.UF);
|
||||
yield return MainUIController.Instance?.FadeOutSync(duration);
|
||||
yield return null;
|
||||
|
||||
Reference in New Issue
Block a user