引擎问题
This commit is contained in:
@@ -1472,7 +1472,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
curLevel: 1
|
||||
heightY: 0.783
|
||||
heightY: 0.562
|
||||
minY: 0.221
|
||||
--- !u!61 &551825979
|
||||
BoxCollider2D:
|
||||
|
||||
@@ -52,13 +52,13 @@ namespace AibisDream.FixSystem
|
||||
var engineSystem = FixSystemCenter.SystemDic.Get<EngineSystem>();
|
||||
|
||||
// 黑屏
|
||||
yield return MainUIController.Instance.FadeInSync(FadeDuration);
|
||||
yield return MainUIController.Instance?.FadeInSync(FadeDuration);
|
||||
// 隐藏诊所
|
||||
clinicSystem.gameObject.SetActive(false);
|
||||
// 激活插线系统
|
||||
bodyModuleSystem.gameObject.SetActive(true);
|
||||
// 黑屏淡出
|
||||
yield return MainUIController.Instance.FadeOutSync(FadeDuration);
|
||||
yield return MainUIController.Instance?.FadeOutSync(FadeDuration);
|
||||
// 移动相机
|
||||
yield return CameraKit.Instance.TransCameraAsync(CameraPos, OrthographicSize, Duration);
|
||||
// 开启引擎玩法
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace AibisDream.Framework
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.K))
|
||||
{
|
||||
MonoCenter.Mono.StartCoroutine(FixSystemYarnCommand.SwitchFixSystemTo("Gear"));
|
||||
MonoCenter.Mono.StartCoroutine(FixSystemYarnCommand.SwitchFixSystemTo("Engine"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace AibisDream
|
||||
{
|
||||
float levelHeight = heightY / (_engineSystem.config.maxLevel - 1);
|
||||
var curY = levelHeight * curLevel + minY;
|
||||
transform.position = new Vector3(transform.position.x, curY, transform.position.z);
|
||||
transform.localPosition = new Vector3(transform.localPosition.x, curY, transform.localPosition.z);
|
||||
}
|
||||
|
||||
private void SwitchAirLevel(float mouseY)
|
||||
{
|
||||
mouseY -= minY;
|
||||
mouseY -= minY + transform.parent.position.y;
|
||||
|
||||
float levelHeight = heightY / _engineSystem.config.maxLevel;
|
||||
curLevel = (int)(mouseY / levelHeight);
|
||||
@@ -47,6 +47,12 @@ namespace AibisDream
|
||||
if (curLevel < 0) curLevel = 0;
|
||||
}
|
||||
|
||||
public void MoveToLevel(int level)
|
||||
{
|
||||
curLevel = level - 1;
|
||||
UpdateTransform();
|
||||
}
|
||||
|
||||
public void StopMove()
|
||||
{
|
||||
_engineSystem.UpdateAirLevel(curLevel);
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace AibisDream
|
||||
public static string DataPath = Application.streamingAssetsPath + "/LevelData/EngineSystem/";
|
||||
|
||||
private SpriteRenderer _cover;
|
||||
private AirGate _airGate;
|
||||
|
||||
[Header("系统配置")] [SerializeField] public EngineConfig config;
|
||||
[Header("系统数据")] [SerializeField] private EngineData engineData;
|
||||
@@ -33,12 +34,17 @@ namespace AibisDream
|
||||
{
|
||||
FixSystemCenter.SystemDic.Register(this);
|
||||
_cover = transform.Find("Cover").GetComponent<SpriteRenderer>();
|
||||
_airGate = transform.Find("Air Gate").GetComponent<AirGate>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
engineData = new EngineData(config.invalidTime);
|
||||
|
||||
// 初始档位置为2
|
||||
_airGate.MoveToLevel(2);
|
||||
DialogController.Instance?.SetVariable("$curAirLevel", 2);
|
||||
engineData.UpdateAirLevel(1, config.maxLevel); // 内部档位从0计数,1就是2
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@@ -82,8 +88,8 @@ namespace AibisDream
|
||||
public void UpdateAirLevel(int curLevel)
|
||||
{
|
||||
engineData.UpdateAirLevel(curLevel, config.maxLevel);
|
||||
DialogController.Instance.SetVariable("$curAirLevel", curLevel + 1);
|
||||
DialogController.Instance.StartDialogNode("调整进气档位");
|
||||
DialogController.Instance?.SetVariable("$curAirLevel", curLevel + 1);
|
||||
DialogController.Instance?.StartDialogNode("调整进气档位");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user