ZoFo/ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs
2024-08-15 15:44:12 +03:00

33 lines
891 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ZoFo.GameCore.GameManagers.ItemManager
{
public class ItemManager
{
//поля
Dictionary<string, ItemInfo> tagItemPairs;
//методы
ItemInfo GetItemInfo(string tag)
{
return tagItemPairs.GetValueOrDefault(tag);
}
void LoadItemTextures()
{
foreach (var item in tagItemPairs)
{
item.Value.LoadTexture();
}
}
void Initialize()
{
tagItemPairs.Add("wood", new ItemInfo("wood","wood",false,null));
tagItemPairs.Add("rock", new ItemInfo("rock", "rock", false, null));
tagItemPairs.Add("steel", new ItemInfo("steel", "steel", false, null));
}
}
}