冷却液完整版
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using AibisDream.FixSystem;
|
||||
using UnityEngine;
|
||||
using Yarn.Unity;
|
||||
|
||||
namespace AibisDream.Framework
|
||||
{
|
||||
@@ -18,9 +19,9 @@ namespace AibisDream.Framework
|
||||
|
||||
public bool isLocked;
|
||||
|
||||
#endregion
|
||||
private CoolingBottle CurBottle => _pumpUI.bottleSlot.GetCurBottle();
|
||||
|
||||
public CoolingBottle curBottle;
|
||||
#endregion
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -33,6 +34,8 @@ namespace AibisDream.Framework
|
||||
_pumpUI = transform.Find("Pump Part").GetComponent<PumpController>();
|
||||
_bottomUI = transform.Find("Bottom Part").GetComponent<BottleShelf>();
|
||||
_tubeUI = transform.Find("Tube Part").GetComponent<TubeController>();
|
||||
|
||||
isLocked = true;
|
||||
}
|
||||
|
||||
#region 对外开放
|
||||
@@ -57,48 +60,60 @@ namespace AibisDream.Framework
|
||||
public void Unlock()
|
||||
{
|
||||
isLocked = false;
|
||||
if (curBottle)
|
||||
if (CurBottle)
|
||||
{
|
||||
curBottle.IsBlock = false;
|
||||
CurBottle.IsBlock = false;
|
||||
}
|
||||
_pumpUI.OpenBuckle();
|
||||
}
|
||||
|
||||
public void InsertBottle(CoolingBottle bottle)
|
||||
{
|
||||
// 设置为当前Bottle
|
||||
curBottle = bottle;
|
||||
// 插入似乎没有太多逻辑?
|
||||
}
|
||||
|
||||
public void Lock()
|
||||
{
|
||||
isLocked = true;
|
||||
// 已锁定的瓶子禁止使用
|
||||
if (curBottle)
|
||||
if (CurBottle)
|
||||
{
|
||||
curBottle.IsBlock = true;
|
||||
CurBottle.IsBlock = true;
|
||||
}
|
||||
_pumpUI.CloseBuckle();
|
||||
}
|
||||
|
||||
public void StartPump()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
// 进行泵机操作
|
||||
if (isLocked && CurBottle)
|
||||
{
|
||||
// 播放pump动画
|
||||
_pumpUI.PlayPumpAnime();
|
||||
// 播放泵机运行对话
|
||||
// DialogController.Instance.StartDialogNode($"泵机运行_{CurBottle.data.name}");
|
||||
Debug.Log($"泵机运行_{CurBottle.data.name}");
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseBottleUI()
|
||||
[YarnCommand("close_bottle_ui")]
|
||||
public IEnumerator CloseBottleUI()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
yield return _bottomUI.Hide();
|
||||
}
|
||||
|
||||
[YarnCommand("close_cooling_system")]
|
||||
public IEnumerator CloseCoolingSystem()
|
||||
{
|
||||
yield return _pumpUI.Hide();
|
||||
_pumpUI.StopPumpAnime();
|
||||
_pumpUI.DestroyBottle();
|
||||
}
|
||||
|
||||
public void CloseCoolingSystem()
|
||||
[YarnCommand("pull_out_tube")]
|
||||
public IEnumerator PullOutTube()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void PullOutTube()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
yield return _tubeUI.PlayPullOutAnime();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -121,10 +136,10 @@ namespace AibisDream.Framework
|
||||
// 点击泵机开关
|
||||
public void StartPump();
|
||||
// 冷却液架收回
|
||||
public void CloseBottleUI();
|
||||
public IEnumerator CloseBottleUI();
|
||||
// 冷却系统UI收回
|
||||
public void CloseCoolingSystem();
|
||||
public IEnumerator CloseCoolingSystem();
|
||||
// 拔管
|
||||
public void PullOutTube();
|
||||
public IEnumerator PullOutTube();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user