mirror of
				https://github.com/DerTyp7/example-top-down-unity.git
				synced 2025-11-03 22:38:58 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			468 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			468 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System.Collections;
 | 
						|
using System.Collections.Generic;
 | 
						|
using UnityEngine;
 | 
						|
 | 
						|
[CreateAssetMenu(fileName = "Item", menuName = "Items/Item", order = 1)]
 | 
						|
public abstract class Item : ScriptableObject
 | 
						|
{
 | 
						|
    public new string name;
 | 
						|
    public int id;
 | 
						|
    public bool isStackable;
 | 
						|
    public Sprite sprite;
 | 
						|
    
 | 
						|
    public bool isSelected;
 | 
						|
 | 
						|
    public abstract void OnSelect();
 | 
						|
 | 
						|
    public void Select()
 | 
						|
    {
 | 
						|
        isSelected = !isSelected;
 | 
						|
        OnSelect();
 | 
						|
    }
 | 
						|
}
 |