问题修改
This commit is contained in:
@@ -31,6 +31,7 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public IEnumerator SwitchState(FixState nextState, string args = "")
|
||||
{
|
||||
Debug.Log($"SwitchState: {CurState}");
|
||||
if (CurState == nextState) yield break;
|
||||
|
||||
_curArgs = args;
|
||||
@@ -68,7 +69,7 @@ namespace AibisDream.FixSystem
|
||||
FixState.MemoryCut => new MemoryCutState(),
|
||||
FixState.LogicCut => new LogicCutState(),
|
||||
FixState.Dream => new DreamState(),
|
||||
_ => new ClinicState()
|
||||
_ => new DefaultState()
|
||||
};
|
||||
|
||||
res.SetArgs(args);
|
||||
@@ -98,11 +99,26 @@ namespace AibisDream.FixSystem
|
||||
public interface IState
|
||||
{
|
||||
public FixState GetState { get; }
|
||||
public void SetArgs(string args);
|
||||
public void SetArgs(string args) {}
|
||||
public IEnumerator Enter();
|
||||
public IEnumerator Exit();
|
||||
}
|
||||
|
||||
public struct DefaultState : IState
|
||||
{
|
||||
public FixState GetState => FixState.Default;
|
||||
|
||||
public IEnumerator Enter()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
|
||||
public IEnumerator Exit()
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClinicState : IState
|
||||
{
|
||||
public FixState GetState => FixState.Clinic;
|
||||
@@ -115,6 +131,7 @@ namespace AibisDream.FixSystem
|
||||
public IEnumerator Enter()
|
||||
{
|
||||
// 切换相机
|
||||
Debug.Log("相机切换");
|
||||
yield return CameraKit.Instance.SwitchCamera(CameraEnum.Clinic);
|
||||
// 注册对话气泡
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
|
||||
Reference in New Issue
Block a user