TO SQUASH: Fixed issue.

This commit is contained in:
2026-08-27 15:34:06 -04:00
parent 21b0fd7648
commit 04ccf01eb4
6 changed files with 117 additions and 14 deletions
+44 -11
View File
@@ -461,6 +461,7 @@ MonoBehaviour:
m_EditorClassIdentifier: Assembly-CSharp::SharkSpawner
sharkPrefab: {fileID: 1185323843861964289, guid: 4bb45ba16a3bbd351a45d39c3f0b62f9, type: 3}
gameBoardSpriteRenderer: {fileID: 297740151}
player: {fileID: 1002905792}
--- !u!1 &83016091
GameObject:
m_ObjectHideFlags: 0
@@ -492,7 +493,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2111939185}
m_Father: {fileID: 200357627}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &83016093
MonoBehaviour:
@@ -882,6 +883,42 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerGun
player: {fileID: 1002905792}
--- !u!1 &200357626
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 200357627}
m_Layer: 0
m_Name: Managers
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &200357627
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 200357626}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 950242260}
- {fileID: 933658175}
- {fileID: 2071167547}
- {fileID: 683765008}
- {fileID: 83016092}
m_Father: {fileID: 2111939185}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &205614404
GameObject:
m_ObjectHideFlags: 0
@@ -2059,7 +2096,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2111939185}
m_Father: {fileID: 200357627}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &683765009
MonoBehaviour:
@@ -2913,7 +2950,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2111939185}
m_Father: {fileID: 200357627}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &933658176
AudioSource:
@@ -3043,7 +3080,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2111939185}
m_Father: {fileID: 200357627}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &950242261
MonoBehaviour:
@@ -6245,7 +6282,7 @@ GameObject:
- component: {fileID: 2071167548}
m_Layer: 0
m_Name: WorldFiller
m_TagString: Untagged
m_TagString: WorldFiller
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@@ -6263,7 +6300,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2111939185}
m_Father: {fileID: 200357627}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2071167548
MonoBehaviour:
@@ -6489,13 +6526,9 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 950242260}
- {fileID: 485553219}
- {fileID: 933658175}
- {fileID: 2071167547}
- {fileID: 449049743}
- {fileID: 683765008}
- {fileID: 83016092}
- {fileID: 200357627}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2111939186
+8
View File
@@ -54,6 +54,14 @@ public class BallBase : MonoBehaviour
{
player.GetComponent<Player>().OnBarHit();
}
// Notify other systems if needed.
var worldFiller = GameObject.FindGameObjectWithTag("WorldFiller");
if (worldFiller != null)
{
worldFiller.GetComponent<WorldFiller>().ClearWalls();
}
}
}
+49
View File
@@ -107,6 +107,12 @@ public class LevelEnder : MonoBehaviour
{
addScoreTimer = 0.0f;
addScoreToPlayer = AddScore();
if (!addScoreToPlayer)
{
tallyShown = false;
StartCoroutine(ProceedToNextLevel());
}
}
}
}
@@ -260,4 +266,47 @@ public class LevelEnder : MonoBehaviour
yield return new WaitForSeconds(7.3f - 3.0f - (player.multiplier != 1.0f ? 0.75f : 0.0f));
addScoreToPlayer = true;
}
private IEnumerator ProceedToNextLevel()
{
musicManager.PauseMusic();
yield return new WaitForSeconds(1.0f);
player.OnLevelEnd();
// Reenable spawners.
multiplierSpawner.StartSpawning();
sharkSpawner.StartSpawning();
cakeSpawner.StartSpawning();
ballSpawner.StartSpawning();
// Reset state.
levelEnded = false;
tallyShown = false;
addScoreToPlayer = false;
scoreTotal = 0;
addScoreTimer = 0.0f;
// Clear text labels.
timeBonus.text = "";
totalBonus.text = "";
isolationBonus.text = "";
overachieverBonus.text = "";
isolationCount.text = "";
overachieverPercent.text = "";
multiplierBonus.text = "";
overarchieverPercentLabel.enabled = false;
isolationCountSingleLabel.enabled = false;
isolationCountPluralLabel.enabled = false;
// Hide score tally.
levelEndTally.enabled = false;
levelEndTallyBackground.enabled = false;
// TODO: Reset balls.
// Restart music.
musicManager.ResumeMusic();
}
}
+11 -1
View File
@@ -65,12 +65,22 @@ public class MusicManager : MonoBehaviour
{
if (needsReset)
{
if (audioSource.isPlaying)
{
audioSource.Stop();
}
audioSource.clip = null;
clipsQueue.Clear();
ResetQueue();
needsReset = false;
}
audioSource.UnPause();
if (audioSource.clip != null && !audioSource.isPlaying)
{
audioSource.UnPause();
}
isPaused = false;
}
+4 -2
View File
@@ -6,6 +6,8 @@ public class SharkSpawner : Spawner
public SpriteRenderer gameBoardSpriteRenderer;
public Player player;
private Bounds gameBoardBounds;
private float spawnTimer = 0f;
@@ -28,7 +30,7 @@ public class SharkSpawner : Spawner
{
spawnTimer += Time.fixedDeltaTime;
if (spawnTimer >= 1f && isActive && isSpawning)
if (spawnTimer >= 1f && isActive && isSpawning && player.level >= 10)
{
spawnTimer = 0f;
if (Random.value < spawnProbability)
@@ -36,7 +38,7 @@ public class SharkSpawner : Spawner
GameObject shark = Instantiate(sharkPrefab, spawnPosition, Quaternion.identity);
Shark sharkScript = shark.GetComponent<Shark>();
sharkScript.gameBoardSpriteRenderer = gameBoardSpriteRenderer;
sharkScript.player = FindAnyObjectByType<Player>();
sharkScript.player = player;
isActive = false;
}
}
+1
View File
@@ -17,6 +17,7 @@ TagManager:
- Multiplier
- Yummy
- Cake
- WorldFiller
layers:
- Default
- TransparentFX