Day1和Day2重构基本完成,差Day2的UF视觉部分需要处理一下,Yarn部分开始没问题了
This commit is contained in:
@@ -79,29 +79,23 @@ public class FavoritesManager : MonoBehaviour
|
||||
|
||||
public void AddClue(Clue clue)
|
||||
{
|
||||
if (clue.ClueType == ClueType.PunchTape)
|
||||
if (clue is PunchTape punchTape)
|
||||
{
|
||||
if (!_clueData.punchTapeFavorites.Contains(clue))
|
||||
if (!_clueData.punchTapeFavorites.Contains(punchTape))
|
||||
{
|
||||
_clueData.punchTapeFavorites.Add(clue);
|
||||
_clueData.punchTapeFavorites.Add(punchTape);
|
||||
UpdateFavoritesUI();
|
||||
}
|
||||
}
|
||||
else if (clue.ClueType == ClueType.ImageClue)
|
||||
if (!_clueData.punchTapeFavorites.Contains(clue))
|
||||
{
|
||||
_clueData.punchTapeFavorites.Add(clue);
|
||||
UpdateFavoritesUI();
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveClue(Clue clue)
|
||||
{
|
||||
if (clue.ClueType == ClueType.PunchTape)
|
||||
if (clue is PunchTape punchTape)
|
||||
{
|
||||
if (_clueData.punchTapeFavorites.Contains(clue))
|
||||
if (_clueData.punchTapeFavorites.Contains(punchTape))
|
||||
{
|
||||
_clueData.punchTapeFavorites.Remove(clue);
|
||||
_clueData.punchTapeFavorites.Remove(punchTape);
|
||||
UpdateFavoritesUI();
|
||||
}
|
||||
}
|
||||
@@ -177,7 +171,7 @@ public class FavoritesManager : MonoBehaviour
|
||||
|
||||
public class ClueData : IData
|
||||
{
|
||||
public List<Clue> punchTapeFavorites = new List<Clue>();
|
||||
public List<PunchTape> punchTapeFavorites = new List<PunchTape>();
|
||||
public event Action<ClueData> LoadEvent;
|
||||
|
||||
public void Load()
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class PunchTape : Clue
|
||||
{
|
||||
public string MemoryIndex { get; set; }
|
||||
|
||||
@@ -318,7 +318,12 @@ public void DeleteLine(string input)
|
||||
if (lineSegmentDictionary.ContainsKey(recognizedName))
|
||||
{
|
||||
InteractiveLineSegment lineSegmentToRemove = lineSegmentDictionary[recognizedName];
|
||||
//lineSegmentDictionary.Remove(recognizedName);
|
||||
|
||||
if (lineSegmentToRemove == null || lineSegmentToRemove.gameObject == null)
|
||||
{
|
||||
Debug.LogWarning("Line segment already removed: " + recognizedName);
|
||||
return;
|
||||
}
|
||||
|
||||
// Destroy the line segment GameObject
|
||||
Destroy(lineSegmentToRemove.gameObject);
|
||||
|
||||
@@ -300,8 +300,15 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public IEnumerator Exit()
|
||||
{
|
||||
var bodyModuleSystem = FixSystemCenter.SystemDic.Get<BodyModuleSystem>();
|
||||
float duration = 0.5f;
|
||||
var eyeSystem = FixSystemCenter.SystemDic.Get<EyeSystem>();
|
||||
yield return MainUIController.Instance.FadeInSync(duration);
|
||||
eyeSystem.OnExit();
|
||||
//关上
|
||||
bodyModuleSystem.FindBodyModuleByName("Eye").transform.Find("Module Pic").GetComponent<SpriteRenderer>()
|
||||
.sprite = Resources.Load<Sprite>("Art/Fix/Peipei/视觉盖子关闭");
|
||||
yield return MainUIController.Instance.FadeOutSync(duration);
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
}
|
||||
@@ -339,9 +346,13 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public IEnumerator Exit()
|
||||
{
|
||||
float duration = 0.5f;
|
||||
var memorySystem = FixSystemCenter.SystemDic.Get<MemoryProcess>();
|
||||
yield return MainUIController.Instance.FadeInSync(duration);
|
||||
memorySystem.OnExit();
|
||||
yield return MainUIController.Instance.FadeOutSync(0.5f);
|
||||
memorySystem.CloseMemoryView();
|
||||
yield return MainUIController.Instance.FadeOutSync(duration);
|
||||
yield return memorySystem.PullMemoryProjector();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,7 @@ public class EyeSystem : MonoBehaviour
|
||||
eyeStateEffect?.CleanupEffect(CurrentTarget);
|
||||
mouseFollowAndZoom.SetIsActive(false);
|
||||
currentTarget = null;
|
||||
CloseEyeView();
|
||||
// 离开视图时的逻辑
|
||||
Debug.Log("EyeView exited.");
|
||||
}
|
||||
@@ -109,6 +110,11 @@ public class EyeSystem : MonoBehaviour
|
||||
{
|
||||
// if (newTarget != currentTarget)
|
||||
// {
|
||||
if (newTarget == null)
|
||||
{
|
||||
Debug.LogError("Target is null in SetTarget");
|
||||
return;
|
||||
}
|
||||
StartCoroutine(SetTargetCoroutine(newTarget.gameObject.name));
|
||||
// }
|
||||
}
|
||||
@@ -142,7 +148,10 @@ public class EyeSystem : MonoBehaviour
|
||||
cameraManager.MoveCameraTo(target.transform, 1f);
|
||||
}
|
||||
|
||||
currentTarget.BlurIn(eyeStateEffect.TransitionDuration, false);
|
||||
if(currentTarget!=null)
|
||||
{
|
||||
currentTarget.BlurIn(eyeStateEffect.TransitionDuration, false);
|
||||
}
|
||||
|
||||
//yield return new WaitForSeconds(eyeStateEffect.TransitionDuration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user