-
Notifications
You must be signed in to change notification settings - Fork 0
/
Item.cs
35 lines (33 loc) · 743 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
using UnityEngine;
using System.Collections;
[System.Serializable]
public class Item
{
public string itemName;
public int itemID;
public string itemDesc;
public Texture2D itemIcon;
public int itemPower;
public int itemSpeed;
public ItemType itemType;
public enum ItemType
{
Weapon,
Consumable,
Quest,
}
public Item(string name, int id, string desc, int power, int speed, ItemType type)
{
itemName = name;
itemID = id;
itemDesc = desc;
itemIcon = Resources.Load<Texture2D>("Item Icons/" + name);
itemPower = power;
itemSpeed = speed;
itemType = type;
}
public Item()
{
itemID = -1;
}
}