From 5d215168f1f78c193945beded17e9b1cec6f6886 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 18 Aug 2023 02:38:54 +0300 Subject: [PATCH 1/5] Init Diamond --- .../GameCore/GameObjects/LivingEntities/Diamond.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs new file mode 100644 index 0000000..c76bb68 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs @@ -0,0 +1,11 @@ +using System; +namespace DangerousD.GameCore.GameObjects.LivingEntities +{ + public class Diamond + { + public Diamond() + { + } + } +} + From 7774609b291d76b94bcdc88128dc63e50fe44124 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 18 Aug 2023 11:49:36 +0300 Subject: [PATCH 2/5] Diamond --- .gitignore | 3 +- .../GameObjects/LivingEntities/Diamond.cs | 19 ++- .../LivingEntities/Player/Player.cs | 157 +++++++++++++----- 3 files changed, 138 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index 1537aee..32fcc78 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ bin obj .vs .idea -DangerousD.sln.DotSettings.user \ No newline at end of file +DangerousD.sln.DotSettings.user +.DS_Store diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs index c76bb68..e7492a0 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs @@ -1,10 +1,25 @@ using System; + +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; + namespace DangerousD.GameCore.GameObjects.LivingEntities { - public class Diamond + public class Diamond : Entity { - public Diamond() + + protected override GraphicsComponent GraphicsComponent => throw new NotImplementedException(); + + public Diamond(Vector2 position) : base(position) { + + } + public void Update(Player player) + { + if (Rectangle.Intersects(player.Rectangle)) + { + player.score++; + } } } } diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index 742d3dd..f1d047a 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -8,38 +8,61 @@ using System.Threading.Tasks; using DangerousD.GameCore.GameObjects.PlayerDeath; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Graphics; +using DangerousD.GameCore.GameObjects.LivingEntities.Monsters; namespace DangerousD.GameCore.GameObjects.LivingEntities { public class Player : LivingEntity { bool isAlive = true; + bool isRight; + string stayAnimation; + bool isJump = false; public int health; public bool isGoRight = false; public Vector2 playerVelocity; public int rightBorder; public int leftBorder; public bool isVisible = true; + private bool isAttacked = false; + private bool isShooting = false; public GameObject objectAttack; + private int bullets; + public int score; public Player(Vector2 position) : base(position) { - Width = 32; - Height = 64; + Width = 16; + Height = 32; AppManager.Instance.InputManager.ShootEvent += Shoot; - AppManager.Instance.InputManager.MovEventJump += AnimationJump; + AppManager.Instance.InputManager.MovEventJump += Jump; AppManager.Instance.InputManager.MovEventDown += MoveDown; + AppManager.Instance.InputManager.ShootEvent += Shoot; - playerVelocity = new Vector2(100, 0); + velocity = new Vector2(0, 0); rightBorder = (int)position.X + 100; leftBorder = (int)position.X - 100; + bullets = 5; + this.GraphicsComponent.actionOfAnimationEnd += (a) => + { + if (a == "playerShootLeft" || a == "playerShootRight") + { + isShooting = false; + } + if (a == "playerReload") + { + bullets++; + } + }; } + public bool IsAlive { get { return isAlive; } } - protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "ZombieMoveRight", "ZombieMoveLeft", "ZombieRightAttack", "ZombieLeftAttack", "DeathFromZombie" }, "ZombieMoveLeft");//TODO: Change to player + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft", + "playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload"}, "playerReload"); public void Attack() { @@ -47,13 +70,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { isVisible = false; } + } public override void OnCollision(GameObject gameObject) { - if (gameObject is Player) - { - isVisible = false; - } base.OnCollision(gameObject); } public override void Draw(SpriteBatch spriteBatch) @@ -65,6 +85,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } public void Death(string monsterName) { + isAttacked = true; if(monsterName == "Zombie") { DeathRectangle deathRectangle = new DeathRectangle(Pos, "DeathFrom" + monsterName); @@ -72,68 +93,128 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { if (a == "DeathFrom" + monsterName) { - AppManager.Instance.ChangeGameState(GameState.GameOver); + AppManager.Instance.ChangeGameState(GameState.Death); } }; } isAlive = false; } - public void AnimationJump() + public void Jump() { - if (Keyboard.GetState().IsKeyDown(Keys.Escape)) + if (isOnGround) { - velocity.Y = -300; + velocity.Y = -11; } // здесь будет анимация } public void Shoot() { - + if (bullets > 0) + { + if (!isShooting) + { + isShooting = true; + bullets--; + if (isRight) + { + if (GraphicsComponent.GetCurrentAnimation != "playerShootRight") + { + GraphicsComponent.StartAnimation("playerShootRight"); + } + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), 100, 10), typeof(Zombie)); + if (targets != null) + { + foreach (var target in targets) + { + Zombie targetZombie = (Zombie)target; + targetZombie.TakeDamage(); + } + } + } + else + { + if (GraphicsComponent.GetCurrentAnimation != "playerShootRight") + { + GraphicsComponent.StartAnimation("playerShootRight"); + } + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), -100, 10), typeof(Zombie)); + if (targets != null) + { + foreach (var target in targets) + { + Zombie targetZombie = (Zombie)target; + targetZombie.TakeDamage(); + } + } + } + } + } } - public override void Update(GameTime gameTime) { - GraphicsComponent.CameraPosition = (_pos-new Vector2(200, 350)).ToPoint(); - velocity.X = 0.5f; - base.Update(gameTime); - if (!isVisible) + GraphicsComponent.SetCameraPosition(Pos); + if (!isAttacked) { - + Move(gameTime); } - Move(gameTime); + else + { + velocity.X = 0; + } + base.Update(gameTime); } public void Move(GameTime gameTime) { float delta = (float)gameTime.ElapsedGameTime.TotalSeconds; - if (isGoRight) + velocity.X = 5 * AppManager.Instance.InputManager.VectorMovementDirection.X; + if (GraphicsComponent.GetCurrentAnimation != "playerShootLeft" && GraphicsComponent.GetCurrentAnimation != "playerShootRight") { - if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveRight") + if (AppManager.Instance.InputManager.VectorMovementDirection.X > 0) { - GraphicsComponent.StartAnimation("ZombieMoveRight"); + isRight = true; + if (GraphicsComponent.GetCurrentAnimation != "playerMoveRight")//идёт направо + { + GraphicsComponent.StartAnimation("playerMoveRight"); + } } - _pos = playerVelocity * delta; - } - else if (!isGoRight) - { - if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveLeft") + else if (AppManager.Instance.InputManager.VectorMovementDirection.X < 0)//идёт налево { - GraphicsComponent.StartAnimation("ZombieMoveLeft"); + isRight = false; + if (GraphicsComponent.GetCurrentAnimation != "playerMoveLeft") + { + GraphicsComponent.StartAnimation("playerMoveLeft"); + } + } + else if (AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит + { + if(bullets < 5) + { + if (GraphicsComponent.GetCurrentAnimation != "playerReload") + { + GraphicsComponent.StartAnimation("playerReload"); + } + } + else if (isRight) + { + GraphicsComponent.StartAnimation("playerRightStay"); + } + else if (!isRight) + { + GraphicsComponent.StartAnimation("playerStayLeft"); + } } - _pos= -playerVelocity * delta; } - if (_pos.X >= rightBorder) + if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) { - isGoRight = false; - } - if (_pos.X >= leftBorder) - { - isGoRight = true; + NetworkTask task = new NetworkTask(id, Pos); + AppManager.Instance.NetworkTasks.Add(task); } } public void MoveDown() { - + // ПОЧЕМУ + velocity.Y = -11; } } From 76af78adc6cfb519d879e1d74ceae74bf9d2eda5 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 18 Aug 2023 13:11:01 +0300 Subject: [PATCH 3/5] nng --- AnimationsFileCreator/AnimationsFileCreator.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AnimationsFileCreator/AnimationsFileCreator.csproj b/AnimationsFileCreator/AnimationsFileCreator.csproj index 9e982a1..d344fbe 100644 --- a/AnimationsFileCreator/AnimationsFileCreator.csproj +++ b/AnimationsFileCreator/AnimationsFileCreator.csproj @@ -2,7 +2,7 @@ Exe - net6.0-windows + net6.0 true From 0bedfaf39dbc115bf953f0a1ece0f96cd37a54d9 Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 18 Aug 2023 15:31:22 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=BA=D0=BE=D1=81=D1=82=D1=8B=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=83=D1=8E=20=D0=BF=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC?= =?UTF-8?q?=D1=83=20=D1=82=D0=B8=D0=BC=D0=BE=D1=84=D0=B5=D1=8F=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=BC=D0=B0=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AnimationsFileCreator.csproj | 1 - AnimationsFileCreator/Program.cs | 9 +-------- .../LivingEntities/Player/Player.cs | 18 +++++++++--------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/AnimationsFileCreator/AnimationsFileCreator.csproj b/AnimationsFileCreator/AnimationsFileCreator.csproj index d344fbe..296b0a7 100644 --- a/AnimationsFileCreator/AnimationsFileCreator.csproj +++ b/AnimationsFileCreator/AnimationsFileCreator.csproj @@ -3,7 +3,6 @@ Exe net6.0 - true diff --git a/AnimationsFileCreator/Program.cs b/AnimationsFileCreator/Program.cs index 9a712a0..0eae948 100644 --- a/AnimationsFileCreator/Program.cs +++ b/AnimationsFileCreator/Program.cs @@ -2,7 +2,6 @@ using Microsoft.Xna.Framework; using Newtonsoft.Json; using System; -using System.Windows.Forms; using System.IO; using System.Linq; using System.Reflection.Metadata; @@ -17,13 +16,7 @@ namespace AnimationsFileCreator Console.WriteLine("Добро пожаловать в костыльную программу по созданию файлов анимации для игры DungerousD"); Console.Write("Введите название текстуры (нажмите enter, чтобы выбрать файл во всплывающем окошке): "); string textureName = Console.ReadLine(); - if (textureName == "") - { - OpenFileDialog dialog = new OpenFileDialog(); - dialog.ShowDialog(); - textureName = dialog.FileName.Split('\\').Last(); - textureName = textureName.Split('.')[0]; - } + Console.WriteLine("Введите количество кадров анимации: "); int framesCount = int.Parse(Console.ReadLine()); Console.WriteLine("Введите длительность кадра в анимации: "); diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index f1d047a..aa0ad89 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -93,7 +93,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { if (a == "DeathFrom" + monsterName) { - AppManager.Instance.ChangeGameState(GameState.Death); + // AppManager.Instance.ChangeGameState(GameState.Death); } }; } @@ -101,10 +101,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } public void Jump() { - if (isOnGround) - { + //if (isOnGround) + //{ velocity.Y = -11; - } + //} // здесь будет анимация } public void Shoot() @@ -127,7 +127,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities foreach (var target in targets) { Zombie targetZombie = (Zombie)target; - targetZombie.TakeDamage(); + // targetZombie.TakeDamage(); } } } @@ -143,7 +143,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities foreach (var target in targets) { Zombie targetZombie = (Zombie)target; - targetZombie.TakeDamage(); + // targetZombie.TakeDamage(); } } } @@ -152,7 +152,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } public override void Update(GameTime gameTime) { - GraphicsComponent.SetCameraPosition(Pos); + // GraphicsComponent.SetCameraPosition(Pos); if (!isAttacked) { Move(gameTime); @@ -207,8 +207,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer) { - NetworkTask task = new NetworkTask(id, Pos); - AppManager.Instance.NetworkTasks.Add(task); + //NetworkTask task = new NetworkTask(id, Pos); + //AppManager.Instance.NetworkTasks.Add(task); } } public void MoveDown() From 38b07b87a9318af4ff749838ee8a640eab5a296c Mon Sep 17 00:00:00 2001 From: Lev Date: Fri, 18 Aug 2023 15:55:53 +0300 Subject: [PATCH 5/5] Diamond_Version 1.0 --- DangerousD/Content/Content.mgcb | 59 +++++++++--------- .../Content/animations/diamondAnimation | 1 + DangerousD/Content/spriteDiamond.png | Bin 0 -> 38325 bytes .../GameObjects/LivingEntities/Diamond.cs | 8 ++- 4 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 DangerousD/Content/animations/diamondAnimation create mode 100644 DangerousD/Content/spriteDiamond.png diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 6729fe5..2c47d18 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -14,17 +14,12 @@ #---------------------------------- Content ---------------------------------# -#begin MonstersAnimations.png -/importer:TextureImporter -/processor:TextureProcessor -/processorParam:ColorKeyColor=255,0,255,255 -/processorParam:ColorKeyEnabled=True -/processorParam:GenerateMipmaps=False +#begin ButtonFont.spritefont +/importer:FontDescriptionImporter +/processor:FontDescriptionProcessor /processorParam:PremultiplyAlpha=True -/processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False -/processorParam:TextureFormat=Color -/build:MonstersAnimations.png +/processorParam:TextureFormat=Compressed +/build:ButtonFont.spritefont #begin deathAnimation.png /importer:TextureImporter @@ -38,13 +33,6 @@ /processorParam:TextureFormat=Color /build:deathAnimation.png -#begin ButtonFont.spritefont -/importer:FontDescriptionImporter -/processor:FontDescriptionProcessor -/processorParam:PremultiplyAlpha=True -/processorParam:TextureFormat=Compressed -/build:ButtonFont.spritefont - #begin DoomTestSong.mp3 /importer:Mp3Importer /processor:SoundEffectProcessor @@ -84,19 +72,6 @@ /processorParam:TextureFormat=Color /build:menuFon.jpg -#begin MonstersAnimations.png -#begin menuFon.jpg -/importer:TextureImporter -/processor:TextureProcessor -/processorParam:ColorKeyColor=255,0,255,255 -/processorParam:ColorKeyEnabled=True -/processorParam:GenerateMipmaps=False -/processorParam:PremultiplyAlpha=True -/processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False -/processorParam:TextureFormat=Color -/build:menuFon.jpg - #begin MenuFon2.jpg /importer:TextureImporter /processor:TextureProcessor @@ -121,6 +96,30 @@ /processorParam:TextureFormat=Color /build:menuFon3.jpg +#begin MonstersAnimations.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:MonstersAnimations.png + +#begin spriteDiamond.png +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:spriteDiamond.png + #begin tiles.png /importer:TextureImporter /processor:TextureProcessor diff --git a/DangerousD/Content/animations/diamondAnimation b/DangerousD/Content/animations/diamondAnimation new file mode 100644 index 0000000..724688c --- /dev/null +++ b/DangerousD/Content/animations/diamondAnimation @@ -0,0 +1 @@ +{"id":"diamondAnimation","textureName":"spriteDiamond","startSpriteRectangle":{"X":0,"Y":0,"Width":512,"Height":420},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":8,"isCycle":true,"offset":"0, 0"} diff --git a/DangerousD/Content/spriteDiamond.png b/DangerousD/Content/spriteDiamond.png new file mode 100644 index 0000000000000000000000000000000000000000..ef28f51a0ff40d35a4e607e5e6cb9b799278e366 GIT binary patch literal 38325 zcmeHw2{@GN8}|@J>0~L=X3bKHk}YM%P9ag*3dx#Ea?*mvltN@Fp$HWkk$nx#bV{;! zvV|-mYHXn~3^UL73@zuMR8DhU-*=fYo%S~u15Fh~a^Jx`=h~GYf*j+X2Bu zy9NHg0{)Lc%!^?_%!7Y2(5}TWe*Tsn5i{@eXNFkXjY0(_T?hmUp{=I8=QKlav$Ep> z%}|7;wya3obvcvp8|tAB4r{~F0)p&Z{Nv{bpr7WoQ~OImY;OIWciujbch@6=?o zU#lBx!j%5}S)%9eLyjLqu#cOs>S+(WK6|p~oJo0R>jSs@1jYKT11+RK3ko`MX$vC* zPQIzr^+bg+mL2FXjc3UejiKg*ajh4WvSA>iOB-@XHyH_N-J>oX{Oqh)5FFIObb_e{ ztkT@g!v35?AGoYi7x?@IOU+V!;CMK~v6PVjLNc5Nm>RkCK~tIUGNO14m2|@>Ur=fv z95v}iMt>R{>`+-ak@KAyio$1d&PXHMylgGX6T!g9#KO-18y^lVv`4(KF+FJm(`0#Mj3E-s?@y#PSH^3WWcLLv=gn1olg+GAFQEZmBte z{r@Ad)NR?!r&3$0L$)U!i}m90g1{)wSiC^|VC8x2PLr$cnIclBD6QMKIvm|qXULyQ zu}`!N5n$3-7efu);v9Nlw`D&W{irTr0GzVu->c)DV9NPnO+ws}*T**yz~aYj(J`K6 z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0..6826a40 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs @@ -1,5 +1,5 @@ using System; - +using System.Collections.Generic; using DangerousD.GameCore.Graphics; using Microsoft.Xna.Framework; @@ -8,13 +8,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities public class Diamond : Entity { - protected override GraphicsComponent GraphicsComponent => throw new NotImplementedException(); + protected override GraphicsComponent GraphicsComponent { get; } = new GraphicsComponent(new List() { "spriteDiamond" }, "spriteDiamond"); public Diamond(Vector2 position) : base(position) { } - public void Update(Player player) + + + public void Update(Player player) { if (Rectangle.Intersects(player.Rectangle)) {