addItemManagerWithUnworkMethods
This commit is contained in:
parent
dbf81f5624
commit
f5d563f887
4 changed files with 70 additions and 8 deletions
24
ZoFo/GameCore/GameManagers/ItemManager/ItemInfo.cs
Normal file
24
ZoFo/GameCore/GameManagers/ItemManager/ItemInfo.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.ItemManager
|
||||||
|
{
|
||||||
|
class ItemInfo
|
||||||
|
{
|
||||||
|
//поля
|
||||||
|
string tag;
|
||||||
|
string textureName;
|
||||||
|
Texture2D itemTexture;
|
||||||
|
bool isCraftable;
|
||||||
|
Dictionary<string, int> resourcesNeededToCraft;
|
||||||
|
//методы
|
||||||
|
private void LoadTexture()
|
||||||
|
{
|
||||||
|
//я что-то хз как это
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
24
ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs
Normal file
24
ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.ItemManager
|
||||||
|
{
|
||||||
|
class ItemManager
|
||||||
|
{
|
||||||
|
//поля
|
||||||
|
Dictionary<string, ItemInfo> tagItemPairs;
|
||||||
|
//методы
|
||||||
|
ItemInfo GetItemInfo(string tag)
|
||||||
|
{
|
||||||
|
return tagItemPairs.GetValueOrDefault(tag);
|
||||||
|
}
|
||||||
|
void LoadItemTexture()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
14
ZoFo/GameCore/GameManagers/ItemManager/WeaponItemInfo.cs
Normal file
14
ZoFo/GameCore/GameManagers/ItemManager/WeaponItemInfo.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace ZoFo.GameCore.GameManagers.ItemManager
|
||||||
|
{
|
||||||
|
class WeaponItemInfo:ItemInfo
|
||||||
|
{
|
||||||
|
//поля
|
||||||
|
float damage;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue