diff --git a/DangerousD/Content/MonstersAnimations.png b/DangerousD/Content/MonstersAnimations.png index 5bc9cca..97e3e11 100644 Binary files a/DangerousD/Content/MonstersAnimations.png and b/DangerousD/Content/MonstersAnimations.png differ diff --git a/DangerousD/Content/animations/HunchmanAttackLeft b/DangerousD/Content/animations/HunchmanAttackLeft index f6b0634..a84b54b 100644 --- a/DangerousD/Content/animations/HunchmanAttackLeft +++ b/DangerousD/Content/animations/HunchmanAttackLeft @@ -1 +1 @@ -{"id":"HunchmanAttackLeft","textureName":"MonstersAnimations","startSpriteRectangle":{"X":101,"Y":124,"Width":40,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"0, 0"} +{"id":"HunchmanAttackLeft","textureName":"MonstersAnimations","startSpriteRectangle":{"X":112,"Y":124,"Width":27,"Height":24},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"4, 0"} diff --git a/DangerousD/Content/animations/HunchmanAttackRight b/DangerousD/Content/animations/HunchmanAttackRight index 482d7f3..b4e8552 100644 --- a/DangerousD/Content/animations/HunchmanAttackRight +++ b/DangerousD/Content/animations/HunchmanAttackRight @@ -1 +1 @@ -{"id":"HunchmanAttackRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":101,"Y":99,"Width":40,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"0, 0"} +{"id":"HunchmanAttackRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":102,"Y":99,"Width":31,"Height":24},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"8, 0"} diff --git a/DangerousD/Content/animations/HunchmanMoveRight b/DangerousD/Content/animations/HunchmanMoveRight index a289fa5..2719ebe 100644 --- a/DangerousD/Content/animations/HunchmanMoveRight +++ b/DangerousD/Content/animations/HunchmanMoveRight @@ -1,3 +1 @@ - -{"id":"HunchmanMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":99,"Width":24,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":4,"isCycle":true,"offset":"0, 0"} - +{"id":"HunchmanMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":100,"Width":24,"Height":23},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":4,"isCycle":true,"offset":"0, 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 @@ + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,799,799,799,799,799,799,799, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +799,799,799,799,799,799,799,799,799,799,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0 + + +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,799,799,799,799,799,799,799,799 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0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0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0, +799,799,799,799,799,799,799,799,799,799,799,0,0,0,0,0 + + + + + + + + + + + + + + diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx index 5377e12..0f91aa8 100644 --- a/DangerousD/Content/lvl.tmx +++ b/DangerousD/Content/lvl.tmx @@ -752,7 +752,7 @@ - + diff --git a/DangerousD/Content/map.tmx b/DangerousD/Content/map.tmx index 813425e..9afca4d 100644 --- a/DangerousD/Content/map.tmx +++ b/DangerousD/Content/map.tmx @@ -62,7 +62,7 @@ - + diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs index 7f7b212..a8dc9c0 100644 --- a/DangerousD/GameCore/GUI/AbstractGui.cs +++ b/DangerousD/GameCore/GUI/AbstractGui.cs @@ -20,7 +20,6 @@ public abstract class AbstractGui : IDrawableObject public virtual void Initialize() { Manager.Initialize(AppManager.Instance.GraphicsDevice); - this.graphicsDevice = graphicsDevice; CreateUI(); } @@ -31,7 +30,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/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