RiftMayhem/Assets/Scripts/Items/ItemIndexer.cs
Pedro Gomes a966809f20 Update with class & attack
- melee attack first iteration (WIP)
- priest playable class
- priest "holy ball" ability
2024-05-21 20:37:07 +01:00

37 lines
794 B
C#

using Kryz.CharacterStats.Examples;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ItemIndexer : MonoBehaviour
{
#region Singleton
private static ItemIndexer _instance;
// Public reference to the singleton instance
public static ItemIndexer Instance
{
get
{
return _instance;
}
}
#endregion
public List<Item> Items = new List<Item>();
protected void Awake()
{
// Ensure there's only one instance
if (_instance != null && _instance != this)
{
Destroy(gameObject);
return;
}
// If this is the first instance, set it as the singleton
_instance = this;
DontDestroyOnLoad(gameObject);
}
}