diff --git a/ZoFo/GameCore/Client.cs b/ZoFo/GameCore/Client.cs index f8a9288..c358322 100644 --- a/ZoFo/GameCore/Client.cs +++ b/ZoFo/GameCore/Client.cs @@ -1,4 +1,8 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; + namespace ZoFo.GameCore { public class Client @@ -10,5 +14,13 @@ namespace ZoFo.GameCore public void JoinRoom(){ } public void JoinYourself(){ } + + internal void Update(GameTime gameTime) + { + } + + internal void Draw(SpriteBatch spriteBatch) + { + } } } \ No newline at end of file diff --git a/ZoFo/GameCore/GameManagers/AppManager.cs b/ZoFo/GameCore/GameManagers/AppManager.cs index 495a618..54560ae 100644 --- a/ZoFo/GameCore/GameManagers/AppManager.cs +++ b/ZoFo/GameCore/GameManagers/AppManager.cs @@ -8,6 +8,7 @@ using DangerousD.GameCore.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; +using ZoFo.GameCore.GameManagers.ItemManager; using ZoFo.GameCore.GUI; using static System.Collections.Specialized.BitVector32; @@ -23,13 +24,14 @@ namespace ZoFo.GameCore.GameManagers public static AppManager Instance { get; private set; } public GameState gamestate; public AbstractGUI currentGUI; - //public Client client; - //public Server server; + public Client client; + public Server server; #region Managers public InputManager InputManager; + public ItemManager.ItemManager ItemManager; public AnimationBuilder animationBuilder{get;set; } @@ -73,17 +75,17 @@ namespace ZoFo.GameCore.GameManagers Exit(); InputManager.Update(); - //currentGUI.Update(); + currentGUI.Update(gameTime); switch (gamestate) { case GameState.NotPlaying: break; case GameState.HostPlaying: - //server.Update(GameTime gameTime); - //client.Update(GameTime gameTime); + server.Update(gameTime); + client.Update(gameTime); break; case GameState.ClientPlaying: - //server.Update(GameTime gameTime); + server.Update(gameTime); break; default: break; @@ -97,12 +99,12 @@ namespace ZoFo.GameCore.GameManagers GraphicsDevice.Clear(Color.CornflowerBlue); - //currentGUI.Draw(_spriteBatch); + currentGUI.Draw(_spriteBatch); switch (gamestate) { case GameState.ClientPlaying: case GameState.HostPlaying: - //client.Draw(_spriteBatch); + client.Draw(_spriteBatch); break; case GameState.NotPlaying: default: @@ -118,8 +120,6 @@ namespace ZoFo.GameCore.GameManagers public void SetGUI(AbstractGUI gui) { currentGUI = gui; - - //TODO } public void GameEnded(Dictionary lootIGot) diff --git a/ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs b/ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs index 3585ec4..183c38f 100644 --- a/ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs +++ b/ZoFo/GameCore/GameManagers/ItemManager/ItemManager.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace ZoFo.GameCore.GameManagers.ItemManager { - class ItemManager + public class ItemManager { //поля Dictionary tagItemPairs; diff --git a/ZoFo/GameCore/GameManagers/ItemManager/PlayerData.cs b/ZoFo/GameCore/GameManagers/ItemManager/PlayerData.cs new file mode 100644 index 0000000..28fb5e9 --- /dev/null +++ b/ZoFo/GameCore/GameManagers/ItemManager/PlayerData.cs @@ -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 +{ + /// + /// Класс хранит информацю о количестве ресурсов у игрока + /// + internal class PlayerData + { + Dictionary items; + /// + /// Принимает + /// + /// + public void CraftItem(string itemTag) + { + + } + } +} diff --git a/ZoFo/GameCore/Server.cs b/ZoFo/GameCore/Server.cs index 948ee0e..e1e648d 100644 --- a/ZoFo/GameCore/Server.cs +++ b/ZoFo/GameCore/Server.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.Xna.Framework; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -17,6 +18,8 @@ namespace ZoFo.GameCore public void StartGame() { } public void EndGame() { } - + internal void Update(GameTime gameTime) + { + } } }