evershade/Assets/Data/ScriptableObjects/World/RockInteractable.cs

74 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "RockInteractable", menuName = "Game Data/Farming/Rock Interactable")]
public class RockInteractable : Interactable
{
public enum RockSize
{
Small,
Medium,
Large
}
public RockSize rockSize;
// automatically set the type when creating new instance
public RockInteractable()
{
type = InteractableType.Rock;
}
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()
{
// do nothing it's a rock!
//but may have to apply like weather effects on days with weather here at some point.
}
public void Initialize()
{
Debug.Log("Rock Initialize");
ContainsItems = new List<ResourceItem>();
}
}