Lots of fixes. 2 BUGS FOUND (read)

Added white border to flag sprite.  Removed debug.log testing code. Fixed hat respawn bug. Positioned all flags/end zones in every map properly. Extensively tested each gamemode with 3 players and found 2 bugs I cannot seem to fix.

First bug I found is the Win Screen that displays during FreeForAll always only shows Player 1 as the winner, regardless of the actual winner. The Win Screen fails to update to the proper player and color after a player wins. This only happens while playing FreeForAll, on any map other than Clouds. The Clouds map, and every other gamemode and map combination works just fine.

The second bug I found could be considered a feature if we wanted. During a Keep Away game, when the Hat is inactive for too long, it appears to spaz over the screen for a second right before respawning. I'm not sure if this is an animation bug or a spawnpoint bug in the code.

Other than these two bugs, every map has been extensively tested and tweaked to work properly for every gamemode.
This commit is contained in:
djkellerman
2025-04-18 00:34:33 -04:00
parent c2463da317
commit 0838aebf89
10 changed files with 2274 additions and 1194 deletions

View File

@@ -37,7 +37,7 @@ namespace Game
if (GameManager.Instance.gameOver) GetComponent<BoxCollider2D>().enabled = false;
if (isDropped && Time.time - lastInteractionTime > respawnTime)
{
RespawnHat();
StartCoroutine(RespawnHat());
}
}
@@ -45,6 +45,7 @@ namespace Game
{
if (collision.gameObject.CompareTag("Platformer Hazard"))
{
isDropped = true;
StartCoroutine(RespawnHat());
}
}

View File

@@ -21,7 +21,6 @@ public class RespawnOnTriggerEnter : MonoBehaviour
{
if (TryGetComponent(out Damageable damageable))
{
print("Voided out " + other.name);
damageable.Damage(9999f);
}
}

View File

@@ -23,10 +23,8 @@ public class WinScreen : MonoBehaviour
public void ShowWinScreen(int player)
{
Debug.Log($"ShowWinScreen called for Player {player}");
if (player - 1 < 0 || player - 1 >= GameManager.playerColors.Count)
{
Debug.LogError("Invalid player index or playerColors not initialized.");
return;
}
@@ -42,7 +40,6 @@ public class WinScreen : MonoBehaviour
Animator animator = GetComponent<Animator>();
if (animator == null)
{
Debug.LogError("Animator component missing on WinScreen.");
return;
}

View File

@@ -191,7 +191,7 @@ namespace Player
/// </summary>
public void HandleDeath()
{
print("Player " + gameObject.name + " died");
print("Player " + gameObject.name + " died");
GameManager.Instance.PlayerDied(this);
animator.SetBool("die", false);
dying = false;