53 lines
1.1 KiB
C#
53 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[System.Serializable]
|
|
public class Item
|
|
{
|
|
public string name;
|
|
public string Name
|
|
{
|
|
get { return name; }
|
|
set { name = value; }
|
|
}
|
|
|
|
public string description;
|
|
public string Description
|
|
{
|
|
get { return description; }
|
|
set { description = value; }
|
|
}
|
|
|
|
public int level;
|
|
public int Level
|
|
{
|
|
get { return level; }
|
|
set { level = value; }
|
|
}
|
|
|
|
public Image image;
|
|
public Image Image
|
|
{
|
|
get { return image; }
|
|
set { image = value; }
|
|
}
|
|
|
|
// to handle object created on scene for example after removing from inventory
|
|
public GameObject itemModel;
|
|
public GameObject ItemModel
|
|
{
|
|
get { return itemModel; }
|
|
set { itemModel = value; }
|
|
}
|
|
|
|
public Item(string _name="", string _description="", int _level=0, Image _image=null)
|
|
{
|
|
this.Name = _name;
|
|
this.Description = _description;
|
|
this.Level = _level;
|
|
this.Image = _image;
|
|
}
|
|
}
|