From 7baad9bdf71dd9b348b050576c99ced2dbfcc8f0 Mon Sep 17 00:00:00 2001 From: playinful <82474412+playinful@users.noreply.github.com> Date: Sun, 19 May 2024 15:18:14 -0400 Subject: [PATCH] minor errors --- Assets/Resources/Games/CatchOfTheDay.prefab | 2 +- Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Assets/Resources/Games/CatchOfTheDay.prefab b/Assets/Resources/Games/CatchOfTheDay.prefab index fbe1fa8ad..85003792d 100644 --- a/Assets/Resources/Games/CatchOfTheDay.prefab +++ b/Assets/Resources/Games/CatchOfTheDay.prefab @@ -58,7 +58,7 @@ GameObject: - component: {fileID: 8426454068735829380} - component: {fileID: 1802914307908322209} m_Layer: 0 - m_Name: CatchOfTheDay + m_Name: catchOfTheDay m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs b/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs index 9e3c57c4f..827400e38 100644 --- a/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs +++ b/Assets/Scripts/Games/CatchOfTheDay/CatchOfTheDay.cs @@ -243,7 +243,7 @@ namespace HeavenStudio.Games float newPos = func(0f, 1f, normalizedBeat); Vector3 diff = _CurrentAnglerMoveArgs.EndPosition - _CurrentAnglerMoveArgs.StartPosition; AnglerTransform.localPosition = _AnglerBasePosition + _CurrentAnglerMoveArgs.StartPosition + (diff * newPos); - + if (normalizedBeat >= 1f) { AnglerTransform.localPosition = _AnglerBasePosition + _CurrentAnglerMoveArgs.EndPosition; @@ -297,6 +297,7 @@ namespace HeavenStudio.Games { DestroyOrphanedLakes(); CleanupFishSounds(); + ActiveLakes = new Dictionary(); // set ann movement foreach (RiqEntity e in EventCaller.GetAllInGameManagerList("catchOfTheDay", new string[] { "moveAngler" }).Where(e => e.beat <= beat).OrderBy(e => e.beat)) @@ -497,14 +498,14 @@ namespace HeavenStudio.Games { if (ActiveLakes.ContainsKey(e)) return null; - + if (ActiveLakes.Count >= MAX_LAKES) return null; - + int sort = CacheFishes().FindIndex(x => e == x); if (sort < 0) return null; - + CleanupFishSounds(); Debug.Log($"Spawning Lake {sort}");