mirror of
				https://github.com/DerTyp7/example-top-down-unity.git
				synced 2025-10-31 21:27:07 +01:00 
			
		
		
		
	Harvestable Destroy
This commit is contained in:
		| @@ -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
	 j.mei7
					j.mei7