mirror of
https://github.com/DerTyp7/example-top-down-unity.git
synced 2025-10-31 21:27:07 +01:00
can interact if player has tool selected (in hand))
This commit is contained in:
24
Assets/Scripts/Interaction/TreeInteraction.cs
Normal file
24
Assets/Scripts/Interaction/TreeInteraction.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class TreeInteraction : Harvestable
|
||||
{
|
||||
|
||||
private void Start()
|
||||
{
|
||||
toolType = ToolType.AXE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override string GetDescription()
|
||||
{
|
||||
if (isInRange())
|
||||
return "Baum muss weg";
|
||||
else
|
||||
return "Tree is not in range";
|
||||
}
|
||||
public override void Interact()
|
||||
{
|
||||
Debug.Log("Harvest BAUM");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user