Poop obstacle pipeline working

This commit is contained in:
Michal Pikulski
2025-11-21 11:33:49 +01:00
parent b4b17c18ed
commit e9320c6d03
20 changed files with 1341 additions and 371 deletions

View File

@@ -56,12 +56,12 @@ namespace Minigames.BirdPooper
return;
}
// Register as override consumer to capture ALL input (except UI button)
// Register as override consumer to capture ALL input (except UI button)
// Register as default consumer (gets input if nothing else consumes it)
// This allows UI buttons to work while still flapping when tapping empty space
if (Input.InputManager.Instance != null)
{
Input.InputManager.Instance.RegisterOverrideConsumer(this);
Debug.Log("[BirdPlayerController] Registered as override input consumer");
Input.InputManager.Instance.SetDefaultConsumer(this);
Debug.Log("[BirdPlayerController] Registered as default input consumer");
}
else
{
@@ -161,12 +161,12 @@ namespace Minigames.BirdPooper
/// <summary>
/// Called when a trigger collider enters this object's trigger.
/// Used for detecting obstacles without physics interactions.
/// Used for detecting obstacles and targets without physics interactions.
/// </summary>
private void OnTriggerEnter2D(Collider2D other)
{
// Check if the colliding object is tagged as an obstacle
if (other.CompareTag("Obstacle"))
// Check if the colliding object is tagged as an obstacle or target
if (other.CompareTag("Obstacle") || other.CompareTag("Target"))
{
HandleDeath();
}