石头Day2
This commit is contained in:
@@ -5,7 +5,6 @@ using UnityEngine;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
|
||||
public struct GearToBodyModuleCommand : ITransitionCommand
|
||||
{
|
||||
private const float Duration = 2f;
|
||||
@@ -15,6 +14,7 @@ namespace AibisDream.FixSystem
|
||||
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
||||
|
||||
// 关盖子
|
||||
yield return gearSystem.CloseGearPanel();
|
||||
yield return gearSystem.CloseCover();
|
||||
// 相机返回
|
||||
yield return CameraKit.Instance.ReturnInitCamera(Duration).WaitForCompletion();
|
||||
@@ -51,6 +51,7 @@ namespace AibisDream.FixSystem
|
||||
|
||||
// 打开引擎盖子
|
||||
yield return gearSystem.OpenCover();
|
||||
yield return gearSystem.OpenGearPanel();
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
@@ -58,4 +59,32 @@ namespace AibisDream.FixSystem
|
||||
_configKey = arg.Trim();
|
||||
}
|
||||
}
|
||||
|
||||
public struct GearToClinicCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
||||
|
||||
// 盖上盖子
|
||||
yield return gearSystem.CloseGearPanel();
|
||||
yield return gearSystem.CloseCover();
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 相机归位
|
||||
CameraKit.Instance.ResetCamara();
|
||||
// 打开诊所
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
// 没有参数
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,13 +51,13 @@ namespace AibisDream.FixSystem
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
// // 黑屏
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 隐藏诊所
|
||||
clinicSystem.gameObject.SetActive(false);
|
||||
// 激活插线系统
|
||||
bodyModuleSystem.gameObject.SetActive(true);
|
||||
// // 黑屏淡出
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
// 移动相机
|
||||
yield return CameraKit.Instance.TransCameraAsync(CameraPos, OrthographicSize, Duration);
|
||||
@@ -117,4 +117,48 @@ namespace AibisDream.FixSystem
|
||||
// 没有需要设置的
|
||||
}
|
||||
}
|
||||
|
||||
public struct ClinicToGearCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
// 引擎相机设置
|
||||
private static readonly Vector3 CameraPos = new(-1.09f, -0.07f, -10);
|
||||
private const float OrthographicSize = 1.6f;
|
||||
private const float Duration = 2f;
|
||||
|
||||
private string _configName;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
||||
|
||||
// 黑屏
|
||||
// yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 隐藏诊所
|
||||
clinicSystem.gameObject.SetActive(false);
|
||||
// 激活插线系统
|
||||
bodyModuleSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
// yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
// 移动相机
|
||||
yield return CameraKit.Instance.TransCameraAsync(CameraPos, OrthographicSize, Duration);
|
||||
// 开启引擎玩法
|
||||
if (!string.IsNullOrEmpty(_configName))
|
||||
{
|
||||
gearSystem.CurDataKey = _configName;
|
||||
gearSystem.Load();
|
||||
}
|
||||
|
||||
yield return gearSystem.OpenCover();
|
||||
yield return gearSystem.OpenGearPanel();
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
_configName = arg.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user