mirror of
				https://github.com/DerTyp7/example-top-down-unity.git
				synced 2025-10-31 05:17:07 +01:00 
			
		
		
		
	can interact if player has tool selected (in hand))
This commit is contained in:
		| @@ -3,10 +3,19 @@ using System.Collections.Generic; | ||||
| using UnityEngine; | ||||
|  | ||||
| [CreateAssetMenu(fileName = "Item", menuName = "Items/Item", order = 1)] | ||||
| public class Item : ScriptableObject | ||||
| public abstract class Item : ScriptableObject | ||||
| { | ||||
|     public new string name; | ||||
|     public int id; | ||||
|     public bool isStackable; | ||||
|     public Sprite sprite; | ||||
|     public bool isSelected; | ||||
|  | ||||
|     public abstract void OnSelect(); | ||||
|  | ||||
|     public void Select() | ||||
|     { | ||||
|         isSelected = !isSelected; | ||||
|         OnSelect(); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 j.mei7
					j.mei7