diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index deb8ae4..2e1932d 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -195,14 +195,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities StartCicycleAnimation("playerShootRight"); Bullet bullet = new Bullet(new Vector2(Pos.X + 16, Pos.Y)); bullet.ShootRight(); - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 12, Pos.Y - 8)); + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 12, Pos.Y)); } else { StartCicycleAnimation("playerShootBoomUpRight"); Bullet bullet = new Bullet(new Vector2(Pos.X + 16, Pos.Y)); bullet.ShootUpRight(); - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 12, Pos.Y - 8)); + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 12, Pos.Y)); } } else if(!isRight) @@ -212,14 +212,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities StartCicycleAnimation("playerShootBoomUpLeft"); Bullet bullet = new Bullet(new Vector2(Pos.X, Pos.Y)); bullet.ShootLeft(); - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 6, Pos.Y - 7)); + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y)); } else { StartCicycleAnimation("playerShootBoomUpLeft"); Bullet bullet = new Bullet(new Vector2(Pos.X, Pos.Y)); bullet.ShootUpLeft(); - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 6, Pos.Y - 7)); + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 6, Pos.Y)); } } } @@ -344,7 +344,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "playerMoveLeft" }, "playerMoveLeft"); Vector2 direction; - Vector2 maindirection; + public Vector2 maindirection; public void ShootUpRight() { direction = new Vector2(1, -1); @@ -412,10 +412,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } public override void Update(GameTime gameTime) { - if (maindirection != velocity) - { - AppManager.Instance.GameManager.Remove(this); - } base.Update(gameTime); } } diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 62c57b8..116c8a4 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -241,6 +241,7 @@ namespace DangerousD.GameCore Player.Bullet bullet = new Player.Bullet(networkTask.position); bullet.id = networkTask.objId; bullet.velocity = networkTask.velocity; + bullet.maindirection = bullet.velocity; } break; case NetworkTaskOperationEnum.SendPosition: