63 lines
1.5 KiB
C#
63 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
[CreateAssetMenu(fileName = "TreeInteractable", menuName = "Game Data/Farming/Tree Interactable")]
|
|
public class TreeInteractable : Interactable
|
|
{
|
|
public TreeInteractable()
|
|
{
|
|
type = InteractableType.Tree;
|
|
}
|
|
|
|
public List<ResourceItem> ContainsItems { get; set; }
|
|
|
|
public Sprite display { get; set; }
|
|
public int id { get; set; }
|
|
public float interactRange { get; set; }
|
|
public string objectName { get; set; }
|
|
public Vector2Int size { get; set; }
|
|
public InteractableType type { get; set; }
|
|
public ToolItem.ToolType[] validToolTypes { get; set; }
|
|
|
|
public void OnEnter2D(Collider2D collider)
|
|
{
|
|
Debug.Log("Rock OnEnter2D");
|
|
}
|
|
|
|
public void OnExit2D(Collider2D collider)
|
|
{
|
|
Debug.Log("Rock OnExit2D");
|
|
}
|
|
|
|
public bool IsPlayerInInteractRange(Vector2 playerPosition, Vector2 itemPosition)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public bool IsToolRequired()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public void OnInteract()
|
|
{
|
|
Debug.Log("Rock OnInteract");
|
|
}
|
|
|
|
public void Interact()
|
|
{
|
|
Debug.Log("Rock Interact");
|
|
}
|
|
|
|
public void OnDayChange()
|
|
{
|
|
// check if the season changes. and if so we will update the tree sprite in the component.
|
|
}
|
|
|
|
public void Initialize()
|
|
{
|
|
Debug.Log("Rock Initialize");
|
|
ContainsItems = new List<ResourceItem>();
|
|
}
|
|
} |