display resource renamed to entity resource

This commit is contained in:
Rendo 2025-07-25 18:07:10 +05:00
commit cea648f0ff
8 changed files with 13 additions and 13 deletions

View file

@ -7,7 +7,7 @@ public partial class GameRegistry : Node
private const string PLANT_RESOURCE_PATH = "res://assets/plants/";
private const string ZOMBIE_RESOURCE_PATH = "res://assets/zombies/";
public static GameRegistry Instance { get; private set; }
public static readonly Dictionary<string, DisplayResource> EntityDictionary = [];
public static readonly Dictionary<string, EntityResource> EntityDictionary = [];
public override void _EnterTree()
{
@ -37,7 +37,7 @@ public partial class GameRegistry : Node
}
}
public static DisplayResource GetEntityByName(string name)
public static EntityResource GetEntityByName(string name)
{
if (EntityDictionary.ContainsKey(name) == false) return null;
return EntityDictionary[name];
@ -51,9 +51,9 @@ public partial class GameRegistry : Node
}
return result;
}
public static List<DisplayResource> GetEntities()
public static List<EntityResource> GetEntities()
{
List<DisplayResource> result = [];
List<EntityResource> result = [];
foreach (var value in EntityDictionary.Values)
{
result.Add(value);