This commit is contained in:
Janis Meister
2023-02-23 13:04:07 +01:00
parent 8565630bd2
commit 1a9bcccfba
11 changed files with 91 additions and 2 deletions

19
Assets/Items/Hoe.asset Normal file
View 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

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 030984201821ba840872812944c9dc13
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f02490ca5153f594898a0b93fcbd19e9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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
{

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e283aa008f05f1e46b99a7987202ec09
guid: f00df81b4ec12f844a6f928d013437b2
MonoImporter:
externalObjects: {}
serializedVersion: 2

View 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();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ab99e668aa1ba5a469eef680f3bb4b45
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -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;

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 46a784de2d881964e8ee1583a44b5720
guid: 00ac127aa1678874aa5c9f1381b6b47a
MonoImporter:
externalObjects: {}
serializedVersion: 2

View 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;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 943c595a7de78d44eae1ff08651910a2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: