diff --git a/DangerousD/Content/animation1.png b/DangerousD/Content/animation1.png
new file mode 100644
index 0000000..bbc2157
Binary files /dev/null and b/DangerousD/Content/animation1.png differ
diff --git a/DangerousD/Content/animations/GibsMoveLeftBottom b/DangerousD/Content/animations/GibsMoveLeftBottom
new file mode 100644
index 0000000..b0f96f0
--- /dev/null
+++ b/DangerousD/Content/animations/GibsMoveLeftBottom
@@ -0,0 +1 @@
+{"id":"GibsMoveLeftBottom","textureName":"MonstersAnimations","startSpriteRectangle":{"X":70,"Y":724,"Width":14,"Height":11},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/GibsMoveLeftTop b/DangerousD/Content/animations/GibsMoveLeftTop
new file mode 100644
index 0000000..e80c714
--- /dev/null
+++ b/DangerousD/Content/animations/GibsMoveLeftTop
@@ -0,0 +1 @@
+{"id":"GibsMoveLeftTop","textureName":"MonstersAnimations","startSpriteRectangle":{"X":2,"Y":721,"Width":14,"Height":12},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/GibsMoveRightBottom b/DangerousD/Content/animations/GibsMoveRightBottom
new file mode 100644
index 0000000..246ab34
--- /dev/null
+++ b/DangerousD/Content/animations/GibsMoveRightBottom
@@ -0,0 +1 @@
+{"id":"GibsMoveRightBottom","textureName":"MonstersAnimations","startSpriteRectangle":{"X":106,"Y":722,"Width":13,"Height":12},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/GibsMoveRightTop b/DangerousD/Content/animations/GibsMoveRightTop
new file mode 100644
index 0000000..4b193fd
--- /dev/null
+++ b/DangerousD/Content/animations/GibsMoveRightTop
@@ -0,0 +1 @@
+{"id":"GibsMoveRightTop","textureName":"MonstersAnimations","startSpriteRectangle":{"X":37,"Y":721,"Width":14,"Height":13},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/GibsNotMove b/DangerousD/Content/animations/GibsNotMove
new file mode 100644
index 0000000..e5333b8
--- /dev/null
+++ b/DangerousD/Content/animations/GibsNotMove
@@ -0,0 +1 @@
+{"id":"GibsNotMove","textureName":"MonstersAnimations","startSpriteRectangle":{"X":137,"Y":731,"Width":16,"Height":5},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":1,"isCycle":true,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/playerReload b/DangerousD/Content/animations/playerReload
new file mode 100644
index 0000000..2dd0586
--- /dev/null
+++ b/DangerousD/Content/animations/playerReload
@@ -0,0 +1 @@
+{"id":"playerReload","textureName":"playerAnimation","startSpriteRectangle":{"X":101,"Y":67,"Width":24,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"0, 0"}
diff --git a/DangerousD/Content/animations/playerShootLeft b/DangerousD/Content/animations/playerShootLeft
new file mode 100644
index 0000000..f2b9f3b
--- /dev/null
+++ b/DangerousD/Content/animations/playerShootLeft
@@ -0,0 +1 @@
+{"id":"playerShootLeft","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":34,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"}
diff --git a/DangerousD/Content/animations/playerShootRight b/DangerousD/Content/animations/playerShootRight
new file mode 100644
index 0000000..922862b
--- /dev/null
+++ b/DangerousD/Content/animations/playerShootRight
@@ -0,0 +1 @@
+{"id":"playerShootRight","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":1,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"}
diff --git a/DangerousD/Content/boss.tmx b/DangerousD/Content/boss.tmx
new file mode 100644
index 0000000..97ea7e8
--- /dev/null
+++ b/DangerousD/Content/boss.tmx
@@ -0,0 +1,162 @@
+
+
diff --git a/DangerousD/Content/debug.tmx b/DangerousD/Content/debug.tmx
new file mode 100644
index 0000000..f52dbe7
--- /dev/null
+++ b/DangerousD/Content/debug.tmx
@@ -0,0 +1,373 @@
+
+
diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx
index 271b1e5..0f91aa8 100644
--- a/DangerousD/Content/lvl.tmx
+++ b/DangerousD/Content/lvl.tmx
@@ -1,7 +1,7 @@
diff --git a/DangerousD/Content/tiles.BMP b/DangerousD/Content/tiles.BMP
new file mode 100644
index 0000000..a9709a0
Binary files /dev/null and b/DangerousD/Content/tiles.BMP differ
diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs
index 7248313..2e30de0 100644
--- a/DangerousD/GameCore/GUI/AbstractGui.cs
+++ b/DangerousD/GameCore/GUI/AbstractGui.cs
@@ -19,7 +19,11 @@ public abstract class AbstractGui : IDrawableObject
private GraphicsDevice graphicsDevice;
public virtual void Initialize()
{
+<<<<<<< HEAD
Manager.Initialize(AppManager.Instance.GraphicsDevice);
+=======
+ Manager.Initialize(AppManager.Instance.GraphicsDevice);
+>>>>>>> ea55e2b4f2b2b9af627579f3c4b82bdf0171d80b
CreateUI();
}
@@ -30,7 +34,7 @@ public abstract class AbstractGui : IDrawableObject
public virtual void Update(GameTime gameTime)
{
- Manager.Update();
+ Manager.Update(gameTime);
}
public virtual void Draw(SpriteBatch spriteBatch)
diff --git a/DangerousD/GameCore/GUI/DebugHUD.cs b/DangerousD/GameCore/GUI/DebugHUD.cs
index b56d90a..c4e3e55 100644
--- a/DangerousD/GameCore/GUI/DebugHUD.cs
+++ b/DangerousD/GameCore/GUI/DebugHUD.cs
@@ -11,6 +11,7 @@ namespace DangerousD.GameCore.GUI
{
private SpriteFont _spriteFont;
private Dictionary _text = new();
+ private List _log = new();
public void Initialize()
{
@@ -27,10 +28,11 @@ namespace DangerousD.GameCore.GUI
public void Draw(SpriteBatch spriteBatch)
{
+ var keysString = Join("\n", _text.Select(el => el.Key + ": " + el.Value).ToList());
spriteBatch.Begin();
spriteBatch.DrawString(
_spriteFont,
- Join("\n", _text.Select(el => el.Key + ": " + el.Value).ToList()),
+ keysString,
new Vector2(10, 10),
Color.Cyan,
0,
@@ -39,6 +41,17 @@ namespace DangerousD.GameCore.GUI
SpriteEffects.None,
0
);
+ spriteBatch.DrawString(
+ _spriteFont,
+ Join("\n", _log),
+ new Vector2(10, 10 + _spriteFont.MeasureString(keysString).Y),
+ Color.Green,
+ 0,
+ Vector2.Zero,
+ 1,
+ SpriteEffects.None,
+ 0
+ );
spriteBatch.End();
}
@@ -46,5 +59,14 @@ namespace DangerousD.GameCore.GUI
{
_text[key] = value;
}
+
+ public void Log(string value)
+ {
+ _log.Add(value);
+ if (_log.Count > 30)
+ {
+ _log.RemoveAt(0);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/DangerousD/GameCore/GUI/HUD.cs b/DangerousD/GameCore/GUI/HUD.cs
index 07e446a..ee17186 100644
--- a/DangerousD/GameCore/GUI/HUD.cs
+++ b/DangerousD/GameCore/GUI/HUD.cs
@@ -11,7 +11,6 @@ namespace DangerousD.GameCore.GUI
{
public class HUD : AbstractGui
{
- int ammout = 0;
List rects = new List { };
int wigth = AppManager.Instance.inGameResolution.X;
int height = AppManager.Instance.inGameResolution.Y;
@@ -27,9 +26,8 @@ namespace DangerousD.GameCore.GUI
}
public override void Update(GameTime gameTime)
{
-
rects.Clear();
- for (int i = 0; i < ammout; i++)
+ for (int i = 0; i < AppManager.Instance.GameManager.GetPlayer1.Bullets; i++)
{
rects.Add(new Rect(Manager) { rectangle = new Rectangle(wigth / 29 + i * 13, height / 17, 5, 20), mainColor = Color.Yellow });
rects[i].LoadTexture(AppManager.Instance.Content);
diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs
index 82170b1..fedaacb 100644
--- a/DangerousD/GameCore/GUI/MenuGUI.cs
+++ b/DangerousD/GameCore/GUI/MenuGUI.cs
@@ -1,9 +1,12 @@
using DangerousD.GameCore.Managers;
+using Microsoft.VisualBasic;
using Microsoft.Xna.Framework;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
using System.Runtime.Serialization;
namespace DangerousD.GameCore.GUI;
@@ -11,6 +14,12 @@ namespace DangerousD.GameCore.GUI;
internal class MenuGUI : AbstractGui
{
int selected = 0;
+ Color[] colors = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52),
+ new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) };
+ List