diesmal wirklich
This commit is contained in:
parent
25f51c2622
commit
2ff7fc2c12
20 changed files with 247 additions and 194 deletions
|
|
@ -1,14 +1,10 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
//TODO: Auf ScriptableItem umschreiben!!!!!!!!!!
|
||||
//
|
||||
//https://www.youtube.com/watch?v=YLhj7SfaxSE
|
||||
public class Item : MonoBehaviour, IComparable<Item> {
|
||||
public readonly string displayName;
|
||||
public readonly string description;
|
||||
public readonly int id; //TODO: create an actual ID System that makes snens
|
||||
public SpriteRenderer spriteRenderer;
|
||||
public class Item : ScriptableObject, IComparable<Item> {
|
||||
public string displayName;
|
||||
public string description;
|
||||
public int id; //TODO: create an actual ID System that makes snens
|
||||
public Sprite selectedSprite;
|
||||
public Sprite defaultSprite;
|
||||
|
||||
|
|
@ -16,7 +12,6 @@ public class Item : MonoBehaviour, IComparable<Item> {
|
|||
this.displayName = displayName;
|
||||
this.description = description;
|
||||
this.id = id;
|
||||
spriteRenderer.sprite ??= defaultSprite; // defaultSprite is set in UnityEditor
|
||||
}
|
||||
|
||||
public int CompareTo(Item other) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue