This commit is contained in:
2024-12-27 18:02:51 +08:00
parent f4266aa236
commit e41a2c275c
4 changed files with 16 additions and 15 deletions
@@ -83,19 +83,19 @@ title: 泵机运行
title: 引擎过速
description: 引擎过速触发
---
当前档位为{$curAirLevel}
过速
===
title: 引擎掉速
description: 引擎掉速触发
---
当前档位为{$curAirLevel}
掉速
===
title: 调整进气档位
description: 调整进气档位时触发
---
当前档位为{$curAirLevel}
调整进气档位
===
// title: EngineSuccess
+6 -5
View File
@@ -807,7 +807,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &199118573
Transform:
m_ObjectHideFlags: 0
@@ -1971,7 +1971,7 @@ Transform:
m_GameObject: {fileID: 551825976}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.472, y: 0.19, z: 0}
m_LocalPosition: {x: -1.472, y: 0.306, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@@ -1989,8 +1989,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4cba880bf0a3caf41b1d03057b9c01b1, type: 3}
m_Name:
m_EditorClassIdentifier:
curLevel: 0
curLevel: 1
heightY: 0.64
minY: 0.19
--- !u!61 &551825979
BoxCollider2D:
m_ObjectHideFlags: 0
@@ -3191,7 +3192,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &843199597
Transform:
m_ObjectHideFlags: 0
@@ -9840,7 +9841,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &6490201648993155036
MonoBehaviour:
m_ObjectHideFlags: 0
+3 -5
View File
@@ -10,15 +10,13 @@ namespace AibisDream
[SerializeField] private int curLevel;
[SerializeField] private float heightY;
private Vector3 _offset;
[SerializeField] private float minY;
public bool IsBlock { get; }
private void Awake()
{
_engineSystem = transform.parent.GetComponent<EngineSystem>();
_offset = transform.position;
}
public void StartMove()
@@ -35,13 +33,13 @@ namespace AibisDream
private void UpdateTransform()
{
float levelHeight = heightY / (_engineSystem.config.maxLevel - 1);
var curY = levelHeight * curLevel + _offset.y;
var curY = levelHeight * curLevel + minY;
transform.position = new Vector3(transform.position.x, curY, transform.position.z);
}
private void SwitchAirLevel(float mouseY)
{
mouseY -= _offset.y;
mouseY -= minY;
float levelHeight = heightY / _engineSystem.config.maxLevel;
curLevel = (int)(mouseY / levelHeight);
@@ -33,11 +33,13 @@ namespace AibisDream
{
FixSystemCenter.SystemDic.Register(this);
_cover = transform.Find("Cover").GetComponent<SpriteRenderer>();
}
private void OnEnable()
{
engineData = new EngineData(config.invalidTime);
DialogController.Instance.SetVariable("$curAirLevel", 2);
}
private void Update()
@@ -275,8 +277,8 @@ namespace AibisDream
if (inAirRange && !curInAirRange && !isSuccess)
{
// 出界的话
if (curAir > curAirMax) DialogController.Instance.StartDialogNode("调速popup-过速");
if (curAir < curAirMin) DialogController.Instance.StartDialogNode("调速popup-掉速");
if (curAir > curAirMax) DialogController.Instance.StartDialogNode("引擎过速");
if (curAir < curAirMin) DialogController.Instance.StartDialogNode("引擎掉速");
isValid.Value = false;
}