mirror of
				https://github.com/DerTyp7/harvestdale-unity.git
				synced 2025-10-30 21:17:09 +01:00 
			
		
		
		
	a
This commit is contained in:
		| @@ -1,32 +0,0 @@ | ||||
| using UnityEngine; | ||||
|  | ||||
| [CreateAssetMenu(fileName = "Hoe", menuName = "Harvestdale/Tools/Hoe", order = 0)] | ||||
| public class Hoe : Tool | ||||
| { | ||||
|  | ||||
|   GameObject player; | ||||
|   private void Start() | ||||
|   { | ||||
|     player = GameObject.FindGameObjectWithTag("Player"); | ||||
|   } | ||||
|  | ||||
|   private Vector3 GetVector3IntInMouseDirection() | ||||
|   { | ||||
|  | ||||
|     Vector3 direction = (player.transform.position - GridBuildingSystem.Instance.GetSnappedMousePosition()).normalized; | ||||
|     Debug.Log(direction); | ||||
|     return direction; | ||||
|   } | ||||
|   public override void OnUse() | ||||
|   { | ||||
|     Debug.Log("Hoe on use"); | ||||
|     GetVector3IntInMouseDirection(); | ||||
|  | ||||
|   } | ||||
|  | ||||
|   public override void Use() | ||||
|   { | ||||
|     Debug.Log("Hoe use"); | ||||
|     OnUse(); | ||||
|   } | ||||
| } | ||||
| @@ -1,11 +0,0 @@ | ||||
| fileFormatVersion: 2 | ||||
| guid: ab99e668aa1ba5a469eef680f3bb4b45 | ||||
| MonoImporter: | ||||
|   externalObjects: {} | ||||
|   serializedVersion: 2 | ||||
|   defaultReferences: [] | ||||
|   executionOrder: 0 | ||||
|   icon: {instanceID: 0} | ||||
|   userData:  | ||||
|   assetBundleName:  | ||||
|   assetBundleVariant:  | ||||
| @@ -1,14 +0,0 @@ | ||||
| using UnityEngine; | ||||
|  | ||||
|  | ||||
| public abstract class Tool : Item | ||||
| { | ||||
|   public abstract void Use(); | ||||
|   public abstract void OnUse(); | ||||
|  | ||||
|   private void Awake() | ||||
|   { | ||||
|     stackable = false; | ||||
|     maxStackSize = 1; | ||||
|   } | ||||
| } | ||||
| @@ -1,11 +0,0 @@ | ||||
| fileFormatVersion: 2 | ||||
| guid: 943c595a7de78d44eae1ff08651910a2 | ||||
| MonoImporter: | ||||
|   externalObjects: {} | ||||
|   serializedVersion: 2 | ||||
|   defaultReferences: [] | ||||
|   executionOrder: 0 | ||||
|   icon: {instanceID: 0} | ||||
|   userData:  | ||||
|   assetBundleName:  | ||||
|   assetBundleVariant:  | ||||
		Reference in New Issue
	
	Block a user
	 Janis
					Janis