Working? MVP of the minigame
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Minigames.Airplane.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// Component for individual airplane selection buttons.
|
||||
/// Handles visual highlight feedback via show/hide of a highlight image.
|
||||
/// </summary>
|
||||
public class AirplaneSelectionButton : MonoBehaviour
|
||||
{
|
||||
[Header("Highlight Visual")]
|
||||
[SerializeField] private Image highlightImage;
|
||||
|
||||
/// <summary>
|
||||
/// Show the highlight visual.
|
||||
/// </summary>
|
||||
public void HighlightStart()
|
||||
{
|
||||
if (highlightImage != null)
|
||||
{
|
||||
highlightImage.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide the highlight visual.
|
||||
/// </summary>
|
||||
public void HighlightEnd()
|
||||
{
|
||||
if (highlightImage != null)
|
||||
{
|
||||
highlightImage.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user