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/map.tmx b/DangerousD/Content/map.tmx
new file mode 100644
index 0000000..813425e
--- /dev/null
+++ b/DangerousD/Content/map.tmx
@@ -0,0 +1,75 @@
+
+
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/GameObjects/LivingEntities/Monsters/Zombie.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs
index 188dfb9..82dcc2a 100644
--- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs
+++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs
@@ -78,7 +78,13 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Death()
{
+ for (int i = 0; i < 3; i++)
+ {
+ Particle particle = new Particle(Pos);
+ }
+
AppManager.Instance.GameManager.Remove(this);
+
}
public override void Move(GameTime gameTime)
@@ -160,6 +166,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
monster_health--;
GraphicsComponent.StartAnimation("ZombieRightAttack");
+ Particle particle = new Particle(Pos);
if (monster_health <= 0)
{
Death();
diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Particle.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Particle.cs
new file mode 100644
index 0000000..cf08319
--- /dev/null
+++ b/DangerousD/GameCore/GameObjects/LivingEntities/Particle.cs
@@ -0,0 +1,46 @@
+using DangerousD.GameCore.Graphics;
+using Microsoft.Xna.Framework;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DangerousD.GameCore.GameObjects.LivingEntities
+{
+ public class Particle : LivingEntity
+ {
+ int delay;
+ public Particle(Vector2 position) : base(position)
+ {
+ Width = 14;
+ Height = 14;
+ Random random = new Random();
+ velocity = new Vector2(random.Next(3, 15), random.Next(3,30));
+ acceleration.Y = 10;
+ delay = 100;
+
+ }
+
+ protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "GibsMoveLeftBottom", "GibsMoveLeftTop", "GibsMoveRightBottom", "GibsMoveRightTop" }, "GibsMoveRightTop");
+ public override void Update(GameTime gameTime)
+ {
+ delay--;
+ if (velocity.X > 0)
+ {
+ velocity.X--;
+ }
+ if(velocity.Y<=0)
+ {
+ GraphicsComponent.StartAnimation("GipsNoMove");
+; }
+ if(delay<=0)
+ {
+ AppManager.Instance.GameManager.Remove(this);
+ }
+ base.Update(gameTime);
+ }
+
+ }
+}
diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
index 0a986b3..1790e25 100644
--- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
+++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
@@ -32,7 +32,13 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
private int bullets;
public bool FallingThroughPlatform = false;
+
+
+
+ public int Bullets { get { return bullets; } }
+
public Player(Vector2 position, bool isNetworkPlayer = false) : base(position)
+
{
Width = 16;
Height = 32;