Working? MVP of the minigame
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user