1.记忆模块现在应该可以随便交换记忆了?如果还有错就放上去直接锁了 2.cluebaord加了统一的错误反馈 3.发热有时候不出现工具我怀疑是任务系统错误,改了下执行优先级 4.让屏幕及时更新不再发热的文字信息
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System.Drawing;
|
|
using UnityEngine;
|
|
|
|
public class MemoryClueSlot : ClueSlotBase
|
|
{
|
|
private MemoryProcess memoryManager;
|
|
[HideInInspector]
|
|
public PunchTape punchTape;
|
|
|
|
protected override void Start()
|
|
{
|
|
base.Start(); // 初始化基类中的内容
|
|
memoryManager = FindObjectOfType<MemoryProcess>();
|
|
expectedClueType=ClueType.PunchTape;
|
|
}
|
|
|
|
// 重写基类的 OnClueInserted 方法,处理播放记忆的逻辑
|
|
protected override void OnClueInserted(Clue clue)
|
|
{
|
|
|
|
if (clue is PunchTape)
|
|
{
|
|
punchTape = clue as PunchTape;
|
|
//punchTape.used=true;
|
|
PlayMemory(punchTape);
|
|
FavoritesManager.Instance.RemoveClue(clue);
|
|
}
|
|
}
|
|
public override void ReleaseSlot()
|
|
{
|
|
base.ReleaseSlot(); // 保证基类的清理逻辑被执行
|
|
currentClueItem.used=true;
|
|
}
|
|
private void PlayMemory(PunchTape punchTape)
|
|
{
|
|
if (punchTape != null)
|
|
{
|
|
string memoryIndex = punchTape.MemoryIndex;
|
|
Debug.Log("播放记忆:" + memoryIndex);
|
|
StartCoroutine(memoryManager.SearchMemory(punchTape));
|
|
}
|
|
}
|
|
}
|