Files
Ultimate-Fishing-Simulator-…/Assets/Scripts/Assembly-CSharp/UI_ItemCell.cs
2026-03-04 09:37:33 +08:00

47 lines
592 B
C#

using UnityEngine;
using UnityEngine.UI;
public class UI_ItemCell : MonoBehaviour
{
private Vector2Int gridPosition;
private bool isEmpty = true;
public Vector2Int GridPosition
{
get
{
return gridPosition;
}
private set
{
gridPosition = value;
}
}
public bool IsEmpty
{
get
{
return isEmpty;
}
set
{
if (value)
{
GetComponent<Image>().color = Color.white;
}
else
{
GetComponent<Image>().color = Color.red;
}
isEmpty = value;
}
}
public void Initialize(Vector2Int gridPosition)
{
GridPosition = gridPosition;
}
}