小问题修改
1. 缺字 2. 切换State关闭其他场景 3. 引擎抽风
This commit is contained in:
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -332,6 +332,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Body Module System
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4070921155132268514, guid: 92aec29b557d59a4ca5363aadd06c7bb, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8209014069305634267, guid: 92aec29b557d59a4ca5363aadd06c7bb, type: 3}
|
||||
propertyPath: m_Materials.Array.data[0]
|
||||
value:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
@@ -71,9 +72,15 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
heatMapController=transform.Find("HeatMapController").GetComponent<HeatMapController>();
|
||||
}
|
||||
Debug.Log("Register");
|
||||
FixSystemCenter.SystemDic.Register(this);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 寻找最接近的Module
|
||||
/// </summary>
|
||||
|
||||
@@ -1,10 +1,67 @@
|
||||
using System.Collections;
|
||||
using AibisDream.Framework;
|
||||
using DG.Tweening;
|
||||
using UnityEditor.Localization.Plugins.XLIFF.V12;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
public struct BodyModuleToClinicCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 把线插回去
|
||||
bodyModuleSystem.ResetPlug();
|
||||
// 诊所显示
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 关闭其他
|
||||
ITransitionCommand.SetBodyModuleSystemActive(false);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
// 暂无参数
|
||||
}
|
||||
}
|
||||
|
||||
public struct EngineToClinicCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
// 盖上盖子
|
||||
yield return engineSystem.CloseCoverAsync();
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance?.FadeInSync(FadeDuration);
|
||||
// 相机归位
|
||||
CameraKit.Instance.ResetCamara();
|
||||
// 打开诊所
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 关闭其他
|
||||
ITransitionCommand.SetBodyModuleSystemActive(false);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance?.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
// 无需参数
|
||||
}
|
||||
}
|
||||
|
||||
public struct GearToBodyModuleCommand : ITransitionCommand
|
||||
{
|
||||
private const float Duration = 2f;
|
||||
@@ -74,6 +131,8 @@ namespace AibisDream.FixSystem
|
||||
CameraKit.Instance.ResetCamara();
|
||||
// 打开诊所
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 关闭其他
|
||||
ITransitionCommand.SetBodyModuleSystemActive(false);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,13 @@ namespace AibisDream.FixSystem
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
|
||||
// 激活
|
||||
ITransitionCommand.SetBodyModuleSystemActive(true);
|
||||
// 加载BodyModuleSystem
|
||||
bodyModuleSystem.CurDataKey = _configName;
|
||||
bodyModuleSystem.Load();
|
||||
@@ -47,16 +51,15 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance?.FadeInSync(FadeDuration);
|
||||
// 激活
|
||||
ITransitionCommand.SetBodyModuleSystemActive(true);
|
||||
// 隐藏诊所
|
||||
clinicSystem.gameObject.SetActive(false);
|
||||
// 激活插线系统
|
||||
bodyModuleSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance?.FadeOutSync(FadeDuration);
|
||||
// 移动相机
|
||||
@@ -120,8 +123,6 @@ 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;
|
||||
@@ -131,14 +132,12 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
||||
|
||||
// 激活
|
||||
ITransitionCommand.SetBodyModuleSystemActive(true);
|
||||
// 隐藏诊所
|
||||
clinicSystem.gameObject.SetActive(false);
|
||||
// 激活插线系统
|
||||
bodyModuleSystem.gameObject.SetActive(true);
|
||||
// 移动相机
|
||||
yield return CameraKit.Instance.TransCameraAsync(CameraPos, OrthographicSize, Duration);
|
||||
// 开启引擎玩法
|
||||
|
||||
@@ -20,35 +20,21 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public interface ITransitionCommand
|
||||
{
|
||||
protected static void SetBodyModuleSystemActive(bool active)
|
||||
{
|
||||
var gearSystem = FixSystemCenter.SystemDic.Get<GearSystem>();
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
gearSystem?.gameObject.SetActive(active);
|
||||
bodyModuleSystem?.gameObject.SetActive(active);
|
||||
engineSystem?.gameObject.SetActive(active);
|
||||
}
|
||||
|
||||
IEnumerator Execute();
|
||||
void SetArgs(string arg);
|
||||
}
|
||||
|
||||
public struct BodyModuleToClinicCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 把线插回去
|
||||
bodyModuleSystem.ResetPlug();
|
||||
// 诊所显示
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
// 暂无参数
|
||||
}
|
||||
}
|
||||
|
||||
public struct BodyModuleToEngineCommand : ITransitionCommand
|
||||
{
|
||||
// 引擎相机设置
|
||||
@@ -113,33 +99,6 @@ namespace AibisDream.FixSystem
|
||||
}
|
||||
}
|
||||
|
||||
public struct EngineToClinicCommand : ITransitionCommand
|
||||
{
|
||||
private const float FadeDuration = 0.5f;
|
||||
|
||||
public IEnumerator Execute()
|
||||
{
|
||||
var clinicSystem = FixSystemCenter.SystemDic.Get<ClinicSystem>();
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
// 盖上盖子
|
||||
yield return engineSystem.CloseCoverAsync();
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
// 相机归位
|
||||
CameraKit.Instance.ResetCamara();
|
||||
// 打开诊所
|
||||
clinicSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
}
|
||||
|
||||
public void SetArgs(string arg)
|
||||
{
|
||||
// 无需参数
|
||||
}
|
||||
}
|
||||
|
||||
public struct BodyModuleToEyeCommand : ITransitionCommand
|
||||
{
|
||||
// 引擎相机设置
|
||||
|
||||
@@ -45,6 +45,9 @@ namespace AibisDream
|
||||
_airGate.MoveToLevel(2);
|
||||
DialogController.Instance?.SetVariable("$curAirLevel", 2);
|
||||
engineData.UpdateAirLevel(1, config.maxLevel); // 内部档位从0计数,1就是2
|
||||
|
||||
gameObject.SetActive(false);
|
||||
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace AibisDream
|
||||
_shaftGraph = new ShaftGraph(shafts, panelShafts);
|
||||
|
||||
_panel.gameObject.SetActive(false);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user