mirror of
https://github.com/DerTyp7/harvestdale-unity.git
synced 2025-10-28 20:32:10 +01:00
tools
This commit is contained in:
19
Assets/Items/Hoe.asset
Normal file
19
Assets/Items/Hoe.asset
Normal file
@@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ab99e668aa1ba5a469eef680f3bb4b45, type: 3}
|
||||
m_Name: Hoe
|
||||
m_EditorClassIdentifier:
|
||||
uuid:
|
||||
itemName:
|
||||
sprite: {fileID: 0}
|
||||
stackable: 1
|
||||
maxStackSize: 100
|
||||
8
Assets/Items/Hoe.asset.meta
Normal file
8
Assets/Items/Hoe.asset.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 030984201821ba840872812944c9dc13
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Scripts/Items.meta
Normal file
8
Assets/Scripts/Items.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f02490ca5153f594898a0b93fcbd19e9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -2,6 +2,7 @@ using UnityEngine;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
[CreateAssetMenu(fileName = "Crop", menuName = "Harvestdale/Items/Crop", order = 0)]
|
||||
public class Crop : Item
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e283aa008f05f1e46b99a7987202ec09
|
||||
guid: f00df81b4ec12f844a6f928d013437b2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
15
Assets/Scripts/Items/Hoe.cs
Normal file
15
Assets/Scripts/Items/Hoe.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "Hoe", menuName = "Harvestdale/Tools/Hoe", order = 0)]
|
||||
public class Hoe : Tool
|
||||
{
|
||||
public override void OnUse()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public override void Use()
|
||||
{
|
||||
OnUse();
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Items/Hoe.cs.meta
Normal file
11
Assets/Scripts/Items/Hoe.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab99e668aa1ba5a469eef680f3bb4b45
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -9,6 +9,8 @@ public class Item : ScriptableObject
|
||||
public string itemName;
|
||||
|
||||
public Sprite sprite;
|
||||
|
||||
[Tooltip("Tools will set this to false on Awake()")]
|
||||
public bool stackable = true;
|
||||
public int maxStackSize = 100;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46a784de2d881964e8ee1583a44b5720
|
||||
guid: 00ac127aa1678874aa5c9f1381b6b47a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
14
Assets/Scripts/Items/Tool.cs
Normal file
14
Assets/Scripts/Items/Tool.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
public abstract class Tool : Item
|
||||
{
|
||||
public abstract void Use();
|
||||
public abstract void OnUse();
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
stackable = false;
|
||||
maxStackSize = 1;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Items/Tool.cs.meta
Normal file
11
Assets/Scripts/Items/Tool.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 943c595a7de78d44eae1ff08651910a2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user