voigas
This commit is contained in:
parent
66eb5af0bb
commit
97b6ce7497
7 changed files with 3 additions and 56 deletions
|
|
@ -1,19 +0,0 @@
|
|||
%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: 5f096d187f76a734fac022700054dfec, type: 3}
|
||||
m_Name: Hoe
|
||||
m_EditorClassIdentifier:
|
||||
displayName:
|
||||
description:
|
||||
id: 0
|
||||
selectedSprite: {fileID: 21300238, guid: 2700e06d970d112489ff23cfb58c3f78, type: 3}
|
||||
defaultSprite: {fileID: 21300212, guid: 2700e06d970d112489ff23cfb58c3f78, type: 3}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 55fbb48b3a41c1049af9b40f3fd35db1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
%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: 5f096d187f76a734fac022700054dfec, type: 3}
|
||||
m_Name: Scythe
|
||||
m_EditorClassIdentifier:
|
||||
displayName: Scythe
|
||||
description: sus
|
||||
id: 0
|
||||
spriteRenderer: {fileID: 0}
|
||||
defaultSprite: {fileID: 21300208, guid: 2700e06d970d112489ff23cfb58c3f78, type: 3}
|
||||
selectedSprite: {fileID: 21300234, guid: 2700e06d970d112489ff23cfb58c3f78, type: 3}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 03bae48711a435b4bb9c1892438a3b3a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "New Item", menuName = "Inventory/Item")]
|
||||
public class Item : ScriptableObject, IComparable<Item> {
|
||||
public string displayName;
|
||||
public string description;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class PlayerController : MonoBehaviour {
|
|||
public void SetSelectedItem(UsableItem item) {
|
||||
if(_inventory.items.ContainsKey(item)) {
|
||||
selectedItem = item;
|
||||
Cursor.SetCursor(item.defaultSprite.texture, Vector2.zero, CursorMode.Auto);
|
||||
Cursor.SetCursor(item.selectedSprite.texture, Vector2.zero, CursorMode.Auto);
|
||||
} else {
|
||||
Debug.Log("An item requested to select isn't in the inventory" + item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "New UsableItem", menuName = "Inventory/UsableItem")]
|
||||
public class UsableItem : Item, IUsable {
|
||||
// Start is called before the first frame update
|
||||
void Start() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue