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;
|
||||
}
|
||||
}
|
|
@ -11,22 +11,22 @@
|
|||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Icon.ico"/>
|
||||
<None Remove="Icon.bmp"/>
|
||||
<None Remove="Icon.ico" />
|
||||
<None Remove="Icon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Icon.ico"/>
|
||||
<EmbeddedResource Include="Icon.bmp"/>
|
||||
<EmbeddedResource Include="Icon.ico" />
|
||||
<EmbeddedResource Include="Icon.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303"/>
|
||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303"/>
|
||||
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
|
||||
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MonogameLibrary\MonogameLibrary.csproj" />
|
||||
</ItemGroup>
|
||||
<Target Name="RestoreDotnetTools" BeforeTargets="Restore">
|
||||
<Message Text="Restoring dotnet tools" Importance="High"/>
|
||||
<Exec Command="dotnet tool restore"/>
|
||||
<Message Text="Restoring dotnet tools" Importance="High" />
|
||||
<Exec Command="dotnet tool restore" />
|
||||
</Target>
|
||||
</Project>
|
Loading…
Add table
Reference in a new issue