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/GameCore/GameObjects/Entities/SilasBall.cs b/DangerousD/GameCore/GameObjects/Entities/SilasBall.cs
index 1c11e0e..48dd53b 100644
--- a/DangerousD/GameCore/GameObjects/Entities/SilasBall.cs
+++ b/DangerousD/GameCore/GameObjects/Entities/SilasBall.cs
@@ -12,7 +12,7 @@ namespace DangerousD.GameCore.GameObjects.Entities
{
public class SilasBall : LivingEntity
{
- private bool IsVisibility=true;
+ public bool IsVisibility=true;
public SilasBall(Vector2 position) : base(position)
{
Height = 60;
diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs
index 66f9527..4b3b5cb 100644
--- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs
+++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs
@@ -67,6 +67,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
for (int i = 0; i < balls.Count; i++)
{
balls[i].SetPosition(new Vector2(Pos.X + i * 40, Pos.Y + 120));
+ balls[i].IsVisibility=true;
}
diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
index 066b1d4..41a7aad 100644
--- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
+++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs
@@ -9,6 +9,7 @@ using DangerousD.GameCore.GameObjects.PlayerDeath;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
+using DangerousD.GameCore.Network;
namespace DangerousD.GameCore.GameObjects.LivingEntities
{
@@ -27,6 +28,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
private bool isAttacked = false;
private bool isShooting = false;
public GameObject objectAttack;
+ public bool isInvincible;
private int bullets;
public Player(Vector2 position) : base(position)
@@ -58,6 +60,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
};
}
+ public Player(Vector2 position, bool isInvincible) : this(position)
+ {
+ this.isInvincible = isInvincible;
+ }
+
public bool IsAlive { get { return isAlive; } }
protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft",
@@ -152,7 +159,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public override void Update(GameTime gameTime)
{
GraphicsComponent.SetCameraPosition(Pos);
- if (!isAttacked)
+ if (!isAttacked || isInvincible)
{
Move(gameTime);
}
diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs
index 84d6b07..661932c 100644
--- a/DangerousD/GameCore/Managers/AppManager.cs
+++ b/DangerousD/GameCore/Managers/AppManager.cs
@@ -202,7 +202,7 @@ namespace DangerousD.GameCore
case GameState.Lobby:
break;
case GameState.Game:
- GameManager.mapManager.LoadLevel("lvl");
+ GameManager.mapManager.LoadLevel("boss");
break;
case GameState.Death:
break;