Working? MVP of the minigame

This commit is contained in:
Michal Pikulski
2025-12-07 20:34:12 +01:00
parent 7ce6d914e6
commit 5d7b36b740
67 changed files with 8370 additions and 192 deletions

View File

@@ -7,7 +7,11 @@ namespace Minigames.Airplane.Targets
{
/// <summary>
/// Represents a target in the airplane minigame.
/// Detects airplane collisions and can be highlighted when active.
/// Detects airplane collisions.
///
/// NOTE: Active/inactive highlighting is deprecated - targets now spawn dynamically per person,
/// so only one target exists in the scene at a time (no need for highlighting multiple targets).
/// The SetAsActiveTarget() method is kept for backward compatibility but is no longer used.
/// </summary>
[RequireComponent(typeof(Collider2D))]
public class AirplaneTarget : ManagedBehaviour
@@ -86,34 +90,6 @@ namespace Minigames.Airplane.Targets
}
}
internal override void OnManagedStart()
{
base.OnManagedStart();
// Start as inactive
SetAsActiveTarget(false);
}
#endregion
#region Active State
/// <summary>
/// Set this target as active (highlighted) or inactive
/// </summary>
public void SetAsActiveTarget(bool active)
{
_isActive = active;
// Update visual feedback
if (spriteRenderer != null)
{
spriteRenderer.color = active ? activeColor : inactiveColor;
}
if (showDebugLogs) Logging.Debug($"[AirplaneTarget] {targetName} set to {(active ? "active" : "inactive")}");
}
#endregion
#region Collision Detection
@@ -134,18 +110,6 @@ namespace Minigames.Airplane.Targets
}
#endregion
#region Public Methods
/// <summary>
/// Reset target to original state
/// </summary>
public void Reset()
{
SetAsActiveTarget(false);
}
#endregion
}
}