52 lines
1.0 KiB
C#
52 lines
1.0 KiB
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Tile : ScriptableObject
|
|
{
|
|
public Crop Crop { get; set; }
|
|
public List<GameItem> GameItems { get; set; }
|
|
public InteractableItem InteractableItem { get; set; }
|
|
|
|
public void Initialize(Vector2Int vector2Int)
|
|
{
|
|
Debug.Log("GRID: GridSpace Initialize");
|
|
Crop = null;
|
|
GameItems = new List<GameItem>();
|
|
InteractableItem = null;
|
|
}
|
|
|
|
public void AddGameItem(GameItem gameItem)
|
|
{
|
|
GameItems.Add(gameItem);
|
|
}
|
|
|
|
public void RemoveGameItem(GameItem gameItem)
|
|
{
|
|
GameItems.Remove(gameItem);
|
|
}
|
|
|
|
public void ClearGameItems()
|
|
{
|
|
GameItems.Clear();
|
|
}
|
|
|
|
public void SetCrop(Crop crop)
|
|
{
|
|
Crop = crop;
|
|
}
|
|
|
|
public void SetInteractableItem(InteractableItem interactableItem)
|
|
{
|
|
InteractableItem = interactableItem;
|
|
}
|
|
|
|
public void ClearCrop()
|
|
{
|
|
Crop = null;
|
|
}
|
|
|
|
public void ClearInteractableItem()
|
|
{
|
|
InteractableItem = null;
|
|
}
|
|
} |