Poop obstacle pipeline working
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user