extended usable Items with UsableItem
This commit is contained in:
parent
fb9aa4e349
commit
0d49c92c15
8 changed files with 21 additions and 26 deletions
|
|
@ -6,33 +6,28 @@ public class PlayerController : MonoBehaviour {
|
|||
private List<Item> inventory;
|
||||
private int money;
|
||||
private UsableItem selectedItem;
|
||||
|
||||
|
||||
private static PlayerController instance;
|
||||
|
||||
|
||||
public int startMoney = 100;
|
||||
|
||||
public static PlayerController getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
void Start() {
|
||||
inventory ??= new List<Item>();
|
||||
money = startMoney;
|
||||
instance = this;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
void Update() {
|
||||
}
|
||||
|
||||
public void setSelectedItem(UsableItem item) {
|
||||
selectedItem = item;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue