mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2026-07-31 15:29:02 +02:00
Harvestable Destroy
This commit is contained in:
@@ -9,7 +9,7 @@ public abstract class Harvestable : Interactable
|
||||
[Tooltip("The time for how long the object needs to be harvested.")]
|
||||
[Range(0.1f, 99.9f)]
|
||||
[SerializeField]
|
||||
float harvestDuration = 3f;
|
||||
float harvestDuration = 1f;
|
||||
|
||||
public ToolType toolType;
|
||||
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TreeInteraction : Harvestable
|
||||
{
|
||||
|
||||
Inventory playerInv;
|
||||
|
||||
[SerializeField]
|
||||
List<Item> drops = new List<Item>();
|
||||
|
||||
private void Start()
|
||||
{
|
||||
playerInv = GameObject.Find("Player").GetComponent<Inventory>();
|
||||
toolType = ToolType.AXE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +28,13 @@ public class TreeInteraction : Harvestable
|
||||
}
|
||||
public override void Interact()
|
||||
{
|
||||
// TODO
|
||||
// ADD DROPS TO INVENTORY
|
||||
// START ANIMATION
|
||||
// DURABILITY ON TOOL
|
||||
|
||||
Debug.Log("Harvest BAUM");
|
||||
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user