-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItem.cs
41 lines (31 loc) · 1018 Bytes
/
Item.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName = "Item", menuName = "Data/Item")]
public class Item : ScriptableObject,Interactable
{
public string name;
public Sprite sprite;
public int maxStack;
public BlockType BlockType;
public bool isPlacable = true;
public bool interactable = false;
public bool isTool = false;
public int durability = 10;
public Tool tool;
public ToolType toolType;
public void interact(Vector3Int posicion = new Vector3Int(), RaycastHit hit = default)
{
InteractableManager.instance.Interact(this,posicion, hit);
//Debug.Log(this.name);
}
public override string ToString()
{
return "Nombre: "+name+"/n"+
"Sprite: "+sprite.name+"/n"+
"MaxStack: "+maxStack+"/n"+
"BlockType: "+BlockType+"/n"+
"IsPlacable: "+isPlacable+"/n"+
"Interactable: "+interactable+"/n";
}
}