From bcab0407a7b4ee4da9986fc72b771feb99adc40d Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 09:04:40 +0300 Subject: [PATCH 1/8] error with zombie and attack anmation --- .../GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs index 188dfb9..865d29d 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs @@ -118,6 +118,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if (AppManager.Instance.GameManager.players[0].IsAlive) { Attack(); + isAttack = false; } } base.OnCollision(gameObject); From b8dab6da8adaeefc862ce3b3f998eddb2fd50950 Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 10:34:41 +0300 Subject: [PATCH 2/8] added smoke after shoot --- DangerousD/Content/Content.mgcb | 12 +++++ DangerousD/Content/SmokeAnimation2.png | Bin 0 -> 20259 bytes DangerousD/Content/animations/smokeAfterShoot | 1 + DangerousD/Content/smokeAnimation.png | Bin 0 -> 3369 bytes .../LivingEntities/Monsters/Zombie.cs | 13 ++++-- ...eathRectangle.cs => AnimationRectangle.cs} | 4 +- .../LivingEntities/Player/Player.cs | 37 ++++++++------- .../LivingEntities/Player/SmokeAfterShoot.cs | 42 ++++++++++++++++++ DangerousD/GameCore/Managers/GameManager.cs | 6 ++- 9 files changed, 92 insertions(+), 23 deletions(-) create mode 100644 DangerousD/Content/SmokeAnimation2.png create mode 100644 DangerousD/Content/animations/smokeAfterShoot create mode 100644 DangerousD/Content/smokeAnimation.png rename DangerousD/GameCore/GameObjects/LivingEntities/Player/{DeathRectangle.cs => AnimationRectangle.cs} (87%) create mode 100644 DangerousD/GameCore/GameObjects/LivingEntities/Player/SmokeAfterShoot.cs diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 37d9842..5988f41 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -223,6 +223,18 @@ /processorParam:TextureFormat=Color /build:sliderBackground.png +#begin SmokeAnimation2.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:SmokeAnimation2.png + #begin textboxbackground1-1.png /importer:TextureImporter /processor:TextureProcessor diff --git a/DangerousD/Content/SmokeAnimation2.png b/DangerousD/Content/SmokeAnimation2.png new file mode 100644 index 0000000000000000000000000000000000000000..b414b01e854a71c1da7d7a29d05eb7b75e1d109d GIT binary patch literal 20259 zcmV)3K+C_0P)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00002 zVoOIv0RM-N%)bBt010qNS#tmY3ljhU3ljkVnw%H_000McNliru-UqrW8cQ^Yz|1U7jZqVm zm>3f)!tTy2MX;A>5>t(u#0u$_4DKHkGUwVp2$W;G(R17tLIa>6Hx)F75v`6)J9ADVSV&x;5oIUYwC7`AZUOs z?sY?7dz(AHP>{;Mz`Br69$2_u&z7mj1RiH8#}b0>@jcOYbQ~Ppn4$u~FJOB-D%Tr; zhdVkW)ir!qvK2mpG3;Z#S!tGdOP%fe58mM&tsdm5DLVR&8jg=bz$Dm7qc!^b^7j6N zcX$O7Zlk$aDw@%?+RB$)1JPnN)TC%YPzG(R_{CFSuD_KH(yxX6iAw#e`ml7D-9NCO z6Jvxu-i+KQ8hY|*Q=~n1X!o(@{i8kd+IOU*OUJ>nO{hSj95pds@%O*0t(Je3B&U3p zX5SEp2Tw@5T78G1k_9BNsm7WbILN1_$bU4qsO`ra))4)#SOG@a%!ki)xU@p*J>r*hv868QZ%m_nA3?N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BIKq;dxcUZfgRfp2+KZ%B!lVQSe%?#d(A=oth8$ z7|Mb0s=`td)1%XjOWGTms>vt}w{90~5{`2G`En$seTkv>?DHOIy|*e~>N8M&d^yR` z;*^IK(=}qRWsiqdh6jYKR+&k8_{5*|`dK4>V^(tTNFQ8;tBDGX3K`#(yTl**n;p;M zq!dRfROUxRPs3hHVzeJ{MJCXM<}dlcEjPp{EBC?7VfR+odJqT7^VbA3B^BYE*2t`# zEHk>ihYI!Kn$SYQmyn>Go05gZ8}*^$u$MO7<=aZSE+q#nnl{zU%u^PzHAzt$3)^l} zu~Z}s5-JrJ{;HXfsg)K zzsb}LV&7pvin?_8IX?%jY;rA_nJgCFRdb|9_P(~$aMCb0MkL-mHC%IFUjL7Veb1pv z2{SIZ_A)5TEiXtV2bwFXLwk{j$UHzGFmy>V{Ibes=H}66J{I`vV;5)j` zX_8w2$5`=UJPy^86oh-@p*01xT)f}Za0c?We~YnmAGyp^TIBUwtgclb^HuaxNN!H(sS0dryPaE)O_imvyY zD`VcLov)ddVKISnXniZ{ufN9xn+MOh#1$WSAo2j^vzMRv`@r|fCz5s7$`~x-iMI`= z@sb+hQP`or)eV5z5uq!M$B;)+hlS8e){|+xSZYJ`vM2Ez9|S~dM@wNuFTO@r8K_%Inc*v477D@^A!pyXM#Z0qi_U{eHJ9|*T@qOZ8OV}tmOnPGn!O-=R z?EI*~KmD%J-aEe0$j8iSZCU>eyj-^>j0f*7k!OD}b<-xTcEHKKNOrnPM{8IsZtLC- zj^kc?RabVVlrj)<|0Q1sdAVF35@*;}UU4JMb{`AMrtcsmv)$;_hfM_!Ylm4|>HLEM z^1ARGP${*%qZ?~W^lHliD$s}u0yKF=K6?pZfb(?y;{4#^?tLI7x$Zve0xTAJ4FwW{ z3Mri`II>bTosY@`1hGpvrqLUl2A + { + if (a == "ZombieRightAttack" || a == "ZombieLeftAttack") + { + isAttaking = false; + } + }; } protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "ZombieMoveRight", "ZombieMoveLeft", "ZombieRightAttack", "ZombieLeftAttack" }, "ZombieMoveLeft"); @@ -123,7 +131,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if (AppManager.Instance.GameManager.players[0].IsAlive) { Attack(); - isAttack = false; } } base.OnCollision(gameObject); @@ -136,14 +143,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if(isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X) { isTarget = true; - leftBorder = Pos.X - 10; + leftBorder = Pos.X - 100; rightBorder = Pos.X + AppManager.Instance.GameManager.players[0].Pos.X; } else if(!isGoRight && this._pos.X >= AppManager.Instance.GameManager.players[0].Pos.X) { isTarget = true; - rightBorder = Pos.X + 10; + rightBorder = Pos.X + 100; leftBorder = AppManager.Instance.GameManager.players[0].Pos.X; } } diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/DeathRectangle.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/AnimationRectangle.cs similarity index 87% rename from DangerousD/GameCore/GameObjects/LivingEntities/Player/DeathRectangle.cs rename to DangerousD/GameCore/GameObjects/LivingEntities/Player/AnimationRectangle.cs index 7dda1b1..25e01f0 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/DeathRectangle.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/AnimationRectangle.cs @@ -9,9 +9,9 @@ using Microsoft.Xna.Framework; namespace DangerousD.GameCore.GameObjects.PlayerDeath { - public class DeathRectangle : GameObject + public class AnimationRectangle : GameObject { - public DeathRectangle(Vector2 pos, string DeathType) : base(pos) + public AnimationRectangle(Vector2 pos, string DeathType) : base(pos) { Height = 48; Width = 48; diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index d0c144a..380d3bb 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -16,11 +16,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities public class Player : LivingEntity { bool isAlive = true; - bool isRight; + bool isRight = true; string stayAnimation; bool isJump = false; public int health; - public bool isGoRight = false; public Vector2 playerVelocity; public int rightBorder; public int leftBorder; @@ -32,6 +31,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities private int bullets; public bool FallingThroughPlatform = false; public bool isUping = false; + private int shootLength = 160; @@ -71,7 +71,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities public bool IsAlive { get { return isAlive; } } protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft", - "playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload"}, "playerReload"); + "playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload", "smokeAfterShoot"}, "playerReload"); public void Attack() { @@ -94,11 +94,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } public void Death(string monsterName) { - return; //godmode isAttacked = true; if(monsterName == "Zombie") { - DeathRectangle deathRectangle = new DeathRectangle(Pos, "DeathFrom" + monsterName); + AnimationRectangle deathRectangle = new AnimationRectangle(Pos, "DeathFrom" + monsterName); deathRectangle.Gr.actionOfAnimationEnd += (a) => { if (a == "DeathFrom" + monsterName) @@ -109,7 +108,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities } else if(monsterName == "Spider") { - DeathRectangle deathRectangle = new DeathRectangle(Pos, "DeathFrom" + monsterName); + AnimationRectangle deathRectangle = new AnimationRectangle(Pos, "DeathFrom" + monsterName); deathRectangle.Gr.actionOfAnimationEnd += (a) => { if (a == "DeathFrom" + monsterName) @@ -142,7 +141,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { GraphicsComponent.StartAnimation("playerShootRight"); } - var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), 100, 10), typeof(Zombie)); + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)); if (targets != null) { foreach (var target in targets) @@ -151,14 +150,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities targetZombie.TakeDamage(); } } + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 30, Pos.Y + 7)); } else { - if (GraphicsComponent.GetCurrentAnimation != "playerShootRight") + if (GraphicsComponent.GetCurrentAnimation != "playerShootLeft") { - GraphicsComponent.StartAnimation("playerShootRight"); + GraphicsComponent.StartAnimation("playerShootLeft"); } - var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), -100, 10), typeof(Zombie)); + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - shootLength, (int)(Pos.Y - 10f), shootLength, 10), typeof(Zombie)); if (targets != null) { foreach (var target in targets) @@ -167,13 +167,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities targetZombie.TakeDamage(); } } + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y + 7)); } } } } public override void Update(GameTime gameTime) { - if (AppManager.Instance.InputManager.ScopeState==ScopeState.Up) + if (AppManager.Instance.InputManager.ScopeState == ScopeState.Up) { isUping = true; } @@ -189,12 +190,16 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities GraphicsComponent.SetCameraPosition(Pos); if (!isAttacked || isInvincible) { - Move(gameTime); - } - else - { - velocity.X = 0; + if (!isShooting) + { + Move(gameTime); + } + else + { + velocity.X = 0; + } } + base.Update(gameTime); } diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/SmokeAfterShoot.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/SmokeAfterShoot.cs new file mode 100644 index 0000000..b401ffc --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/SmokeAfterShoot.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using DangerousD.GameCore.GameObjects; +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; + +namespace DangerousD.GameCore.GameObjects.PlayerDeath +{ + public class SmokeAfterShoot : GameObject + { + public SmokeAfterShoot(Vector2 pos) : base(pos) + { + Height = 6; + Width = 6; + PlaySmoke(); + this.GraphicsComponent.actionOfAnimationEnd += (a) => + { + if (a == "smokeAfterShoot") + { + AppManager.Instance.GameManager.Remove(this); + } + }; + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "smokeAfterShoot" }, + "smokeAfterShoot"); + + public GraphicsComponent Gr => GraphicsComponent; + + private void PlaySmoke() + { + if (GraphicsComponent.GetCurrentAnimation != "smokeAfterShoot") + { + GraphicsComponent.StartAnimation("smokeAfterShoot"); + } + } + + } +} \ No newline at end of file diff --git a/DangerousD/GameCore/Managers/GameManager.cs b/DangerousD/GameCore/Managers/GameManager.cs index 53ffa61..615bd3b 100644 --- a/DangerousD/GameCore/Managers/GameManager.cs +++ b/DangerousD/GameCore/Managers/GameManager.cs @@ -158,8 +158,10 @@ namespace DangerousD.GameCore } } GetPlayer1.Update(gameTime); - foreach (var item in otherObjects) - item.Update(gameTime); + for(int i = 0; i < otherObjects.Count; i++) + { + otherObjects[i].Update(gameTime); + } physicsManager.UpdateCollisions(entities, livingEntities, mapObjects, players, gameTime); } From 5db6cee0fa89a1de3b7ff3bad578c0133a6e5936 Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 11:39:54 +0300 Subject: [PATCH 3/8] fixed some bags --- DangerousD/Content/animations/playerShootLeft | 25 ++++++++- .../Content/animations/playerShootRight | 25 ++++++++- .../LivingEntities/Monsters/Zombie.cs | 19 ++++--- .../LivingEntities/Player/Player.cs | 52 +++++++++---------- 4 files changed, 84 insertions(+), 37 deletions(-) diff --git a/DangerousD/Content/animations/playerShootLeft b/DangerousD/Content/animations/playerShootLeft index f2b9f3b..e710737 100644 --- a/DangerousD/Content/animations/playerShootLeft +++ b/DangerousD/Content/animations/playerShootLeft @@ -1 +1,24 @@ -{"id":"playerShootLeft","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":34,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"} +{ + "id": "playerShootLeft", + "textureName": "playerAnimation", + "startSpriteRectangle": { + "X": 201, + "Y": 34, + "Width": 32, + "Height": 32 + }, + "frameSecond": [ + { + "Item1": 0, + "Item2": 3 + }, + { + "Item1": 1, + "Item2": 20 + } + ], + "textureFrameInterval": 1, + "framesCount": 2, + "isCycle": false, + "offset": "4, 0" +} diff --git a/DangerousD/Content/animations/playerShootRight b/DangerousD/Content/animations/playerShootRight index 922862b..fd11db2 100644 --- a/DangerousD/Content/animations/playerShootRight +++ b/DangerousD/Content/animations/playerShootRight @@ -1 +1,24 @@ -{"id":"playerShootRight","textureName":"playerAnimation","startSpriteRectangle":{"X":201,"Y":1,"Width":32,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"4, 0"} +{ + "id": "playerShootRight", + "textureName": "playerAnimation", + "startSpriteRectangle": { + "X": 201, + "Y": 1, + "Width": 32, + "Height": 32 + }, + "frameSecond": [ + { + "Item1": 0, + "Item2": 3 + }, + { + "Item1": 1, + "Item2": 20 + } + ], + "textureFrameInterval": 1, + "framesCount": 2, + "isCycle": false, + "offset": "4, 0" +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs index 373795a..c1737f2 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Zombie.cs @@ -98,19 +98,13 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { if (isGoRight) { - if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveRight") - { - GraphicsComponent.StartAnimation("ZombieMoveRight"); - } + StartCicycleAnimation("ZombieMoveRight"); velocity.X = monster_speed; } else if (!isGoRight) { - if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveLeft") - { - GraphicsComponent.StartAnimation("ZombieMoveLeft"); - } + StartCicycleAnimation("ZombieMoveLeft"); velocity.X = -monster_speed; } @@ -167,6 +161,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters rightBorder = 760; } } + public void SwitchToRight() + { + isGoRight = true; + } + + public void SwitchToLeft() + { + isGoRight = false; + } public override void Attack(GameTime gameTime) {} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index f0a3d92..b8e68ba 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -134,43 +134,37 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { if (bullets > 0) { - if (!isShooting) + if (!isAttacked) { - isShooting = true; - bullets--; - if (isRight) + if (!isShooting) { - if (GraphicsComponent.GetCurrentAnimation != "playerShootRight") + isShooting = true; + bullets--; + if (isRight) { - GraphicsComponent.StartAnimation("playerShootRight"); - } - var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)); - if (targets != null) - { - foreach (var target in targets) + StartCicycleAnimation("playerShootRight"); + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared()); + if (targets != null) { - Zombie targetZombie = (Zombie)target; + Zombie targetZombie = (Zombie)targets.First(); targetZombie.TakeDamage(); } + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 30, Pos.Y + 7)); } - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 30, Pos.Y + 7)); - } - else - { - if (GraphicsComponent.GetCurrentAnimation != "playerShootLeft") + else { - GraphicsComponent.StartAnimation("playerShootLeft"); - } - var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - shootLength, (int)(Pos.Y - 10f), shootLength, 10), typeof(Zombie)); - if (targets != null) - { - foreach (var target in targets) + StartCicycleAnimation("playerShootLeft"); + var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - shootLength, (int)(Pos.Y - 10f), shootLength, 10), typeof(Zombie)); + if (targets != null) { - Zombie targetZombie = (Zombie)target; - targetZombie.TakeDamage(); + foreach (var target in targets) + { + Zombie targetZombie = (Zombie)target; + targetZombie.TakeDamage(); + } } + SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y + 7)); } - SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y + 7)); } } } @@ -190,7 +184,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities FallingThroughPlatform = false; } GraphicsComponent.SetCameraPosition(Pos); - if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat) + if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat) { if (!isShooting) { @@ -201,6 +195,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities velocity.X = 0; } } + else + { + velocity.X = 0; + } base.Update(gameTime); } From dcc845a517dd32e146eab83fa9fa82fdea6b964d Mon Sep 17 00:00:00 2001 From: bmvolf Date: Fri, 18 Aug 2023 11:50:24 +0300 Subject: [PATCH 4/8] merge commit. Added fix player and monsters --- DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index 05c78a5..eaae151 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -147,7 +147,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities { StartCicycleAnimation("playerShootRight"); var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared()); - if (targets != null) + if (targets.Count() > 0) { Zombie targetZombie = (Zombie)targets.First(); targetZombie.TakeDamage(); From bed41c5bf02452482a29fc6f5a29501d8c1d22dc Mon Sep 17 00:00:00 2001 From: AnloGames <7383an@gmail.com> Date: Fri, 18 Aug 2023 12:30:44 +0300 Subject: [PATCH 5/8] NetworkAnimationSupport(ChangeState) --- DangerousD/GameCore/GameObjects/GameObject.cs | 5 +++ .../LivingEntities/Player/Player.cs | 38 ++++++++++--------- .../GameCore/Graphics/GraphicsComponent.cs | 10 +++++ DangerousD/GameCore/Managers/AppManager.cs | 28 +++++++++++--- DangerousD/GameCore/Managers/GameManager.cs | 9 ++++- 5 files changed, 65 insertions(+), 25 deletions(-) diff --git a/DangerousD/GameCore/GameObjects/GameObject.cs b/DangerousD/GameCore/GameObjects/GameObject.cs index 65bf8c9..a2f0881 100644 --- a/DangerousD/GameCore/GameObjects/GameObject.cs +++ b/DangerousD/GameCore/GameObjects/GameObject.cs @@ -30,6 +30,7 @@ namespace DangerousD.GameCore LoadContent(); AppManager.Instance.GameManager.Register(this); + GraphicsComponent.parentId = id; } public virtual void OnCollision(GameObject gameObject) @@ -62,5 +63,9 @@ namespace DangerousD.GameCore //wdaspriteBatch.Draw(debugTexture,new Rectangle(Rectangle.X-GraphicsComponent.CameraPosition.X,Rectangle.Y-GraphicsComponent.CameraPosition.Y,Rectangle.Width,Rectangle.Height), Color.White); } + public GraphicsComponent GetGraphicsComponent() + { + return this.GraphicsComponent; + } } } \ No newline at end of file diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs index d0c144a..c55155f 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Player/Player.cs @@ -32,14 +32,17 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities private int bullets; public bool FallingThroughPlatform = false; public bool isUping = false; + public bool isNetworkPlayer; + + - public int Bullets { get { return bullets; } } public Player(Vector2 position, bool isNetworkPlayer = false) : base(position) { + this.isNetworkPlayer = isNetworkPlayer; Width = 16; Height = 32; @@ -48,24 +51,24 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities AppManager.Instance.InputManager.ShootEvent += Shoot; AppManager.Instance.InputManager.MovEventJump += Jump; AppManager.Instance.InputManager.MovEventDown += MoveDown; + 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++; + } + }; } - 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; } } @@ -251,6 +254,5 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities isOnGround = false; AppManager.Instance.DebugHUD.Log("FallingThroughPlatform"); } - } } diff --git a/DangerousD/GameCore/Graphics/GraphicsComponent.cs b/DangerousD/GameCore/Graphics/GraphicsComponent.cs index 00d6298..fb72991 100644 --- a/DangerousD/GameCore/Graphics/GraphicsComponent.cs +++ b/DangerousD/GameCore/Graphics/GraphicsComponent.cs @@ -1,4 +1,5 @@ using DangerousD.GameCore.Managers; +using DangerousD.GameCore.Network; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; @@ -18,6 +19,7 @@ namespace DangerousD.GameCore.Graphics private List texturesNames; private AnimationContainer currentAnimation; static private int scaling = 4; + public int parentId; public AnimationContainer CurrentAnimation { get @@ -105,6 +107,14 @@ namespace DangerousD.GameCore.Graphics public void StartAnimation(string startedanimationId) { + if (startedanimationId == "playerShootRight" && parentId == 17) + { + string a = "2"; + } + if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer && startedanimationId != GetCurrentAnimation) + { + AppManager.Instance.NetworkTasks.Add(new NetworkTask(parentId, startedanimationId, Vector2.Zero)); + } currentFrame = 0; currentAnimation = animations.Find(x => x.Id == startedanimationId); diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 33327c7..acd833f 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -111,9 +111,8 @@ namespace DangerousD.GameCore { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) Exit(); - - if (GameManager.GetPlayer1 != null) - DebugHUD.Set("Objid: ", GameManager.GetPlayer1.id.ToString()); + if (GameManager.GetPlayer1 != null) + DebugHUD.Set("id: ", GameManager.GetPlayer1.id.ToString()); InputManager.Update(); SoundManager.Update(); @@ -229,10 +228,11 @@ namespace DangerousD.GameCore case NetworkTaskOperationEnum.CreateEntity: break; case NetworkTaskOperationEnum.SendPosition: - if (networkTask.objId != GameManager.GetPlayer1.id) + if (networkTask.objId != GameManager.GetPlayer1.id ) { LivingEntity entity = GameManager.livingEntities.Find(x => x.id == networkTask.objId); - entity.SetPosition(networkTask.position); + if (entity != null) + entity.SetPosition(networkTask.position); if (multiPlayerStatus == MultiPlayerStatus.Host) { NetworkTasks.Add(networkTask); @@ -240,6 +240,20 @@ namespace DangerousD.GameCore } break; case NetworkTaskOperationEnum.ChangeState: + if (networkTask.objId != GameManager.GetPlayer1.id) + { + List gcs = new List(); + foreach (var player in GameManager.players) + { + gcs.Add(player.GetGraphicsComponent()); + } + LivingEntity entity = GameManager.livingEntities.Find(x => x.id == networkTask.objId); + if (entity != null) + { + GraphicsComponent gc = entity.GetGraphicsComponent(); + gc.StartAnimation(networkTask.name); + } + } break; case NetworkTaskOperationEnum.ConnectToHost: Player connectedPlayer = new Player(Vector2.Zero, true); @@ -257,13 +271,15 @@ namespace DangerousD.GameCore if (!GameManager.GetPlayer1.isIdFromHost) { GameManager.GetPlayer1.id = networkTask.objId; + GraphicsComponent gcsd = GameManager.GetPlayer1.GetGraphicsComponent(); + gcsd.parentId = networkTask.objId; GameManager.GetPlayer1.isIdFromHost = true; } break; case NetworkTaskOperationEnum.AddConnectedPlayer: Player remoteConnectedPlayer = new Player(networkTask.position, true); remoteConnectedPlayer.id = networkTask.objId; - + remoteConnectedPlayer.GetGraphicsComponent().parentId = networkTask.objId; break; default: break; diff --git a/DangerousD/GameCore/Managers/GameManager.cs b/DangerousD/GameCore/Managers/GameManager.cs index 53ffa61..f4a213a 100644 --- a/DangerousD/GameCore/Managers/GameManager.cs +++ b/DangerousD/GameCore/Managers/GameManager.cs @@ -150,14 +150,21 @@ namespace DangerousD.GameCore } else - { for (int i = 0; i < livingEntitiesWithoutPlayers.Count; i++) { livingEntitiesWithoutPlayers[i].PlayAnimation(); } } + foreach (Player player in players) + { + if (player.id != GetPlayer1.id) + { + player.PlayAnimation(); + } + } GetPlayer1.Update(gameTime); + foreach (var item in otherObjects) item.Update(gameTime); From 338fd044a12373269dbd9d60ceccef635e024979 Mon Sep 17 00:00:00 2001 From: Mootfrost777 Date: Fri, 18 Aug 2023 12:47:53 +0300 Subject: [PATCH 6/8] Level 1 fixes --- DangerousD/Content/lvl.tmx | 90 +++++++++++++++++-- .../LivingEntities/Monsters/Slime.cs | 4 - DangerousD/GameCore/Managers/AppManager.cs | 4 - 3 files changed, 81 insertions(+), 17 deletions(-) diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx index df88666..5fcea6a 100644 --- a/DangerousD/Content/lvl.tmx +++ b/DangerousD/Content/lvl.tmx @@ -7,7 +7,7 @@ - + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -147,7 +147,7 @@ 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,272,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,272,0,0,0,272,0,0,0,0,0,0,0,0,0, 52,52,52,0,0,0,52,52,52,52,52,52,52,52,52,52, 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, @@ -208,7 +208,7 @@ 0,0,0,75,0,0,0,0,0,0,0,0,0,0,0,0 -0,0,0,0,0,0,0,0,0,0,46,0,0,66,67,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,66,67,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,66,67,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,66,67,0, 0,0,0,0,0,0,76,76,76,76,76,76,76,76,76,76, @@ -317,7 +317,7 @@ - + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -336,6 +336,24 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,147,199,148,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,696,697,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,147,199,148,0,0,0,0,0,0,0,0,0,0, @@ -442,7 +514,7 @@ 144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157, 157,157,157,157,157,157,258,157,157,157,149,152,157,157,157,157, -157,157,157,157,157,157,271,157,157,157,150,153,157,696,697,157, +157,157,157,157,157,157,271,157,157,157,150,153,157,0,0,157, 157,157,0,204,204,204,284,204,204,204,151,154,204,709,710,204, 157,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 157,157,144,144,144,144,144,144,144,144,144,144,144,144,144,144, @@ -498,7 +570,7 @@ 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29, 29,29,29,19,20,21,22,0,0,29,29,29,29,29,29,29, 29,30,31,32,33,34,35,0,0,29,29,29,29,29,29,29, -29,43,44,45,46,47,48,0,0,29,29,29,29,29,29,29, +29,43,44,45,0,47,48,0,0,29,29,29,29,29,29,29, 64,65,18,58,59,60,18,0,0,29,29,29,29,29,29,29, 77,78,18,71,72,73,18,0,0,68,56,56,55,56,56,69, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 @@ -522,14 +594,14 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -157,157,157,157,267,268,157,696,697,157,157,193,157,157,235,236, +157,157,157,157,267,268,157,0,0,157,157,193,157,157,235,236, 157,0,204,204,280,281,204,709,710,204,204,204,204,204,204,204, 157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 157,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,157,178,179,157,157,157,157,157,157,157,157,157,157,157, 157,157,157,191,192,157,248,249,157,157,157,157,157,157,157,157, 157,157,157,157,157,157,250,251,157,217,261,262,263,264,217,157, -272,204,204,204,204,204,239,240,204,230,274,275,276,277,230,204, +0,204,204,204,204,204,239,240,204,230,274,275,276,277,230,204, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,157,157,157,157,157,157,243,157,157,209,210,211,212,157, @@ -552,7 +624,7 @@ 144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,178,179,157,157,157,157,157,157,157,157,157,157,157,157, 157,157,191,192,157,157,157,157,258,157,157,157,248,249,157,157, -157,157,157,157,157,696,697,157,271,157,157,157,250,251,157,157, +157,157,157,157,157,0,0,157,271,157,157,157,250,251,157,157, 204,204,204,204,204,709,710,204,284,204,204,204,239,240,204,204, 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 diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs index fa84566..5b89e48 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs @@ -12,12 +12,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { public class Slime : CoreEnemy { -<<<<<<< HEAD private bool isGoRight = true; private bool isDown = true; -======= - private bool isDown = false; ->>>>>>> main int leftBorder; int rightBorder; bool isAttaking = false; diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 7b79e45..33327c7 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -205,12 +205,8 @@ namespace DangerousD.GameCore case GameState.Lobby: break; case GameState.Game: -<<<<<<< HEAD - GameManager.mapManager.LoadLevel("map"); -======= GameManager.mapManager.LoadLevel("lvl"); GameManager.FindBorders(); ->>>>>>> main break; case GameState.Death: break; From 8e71a3c73213c148be4fd6213f69dacadd94952e Mon Sep 17 00:00:00 2001 From: Kaktus200020 Date: Fri, 18 Aug 2023 13:09:34 +0300 Subject: [PATCH 7/8] SlimeJumper --- .../GameCore/GameObjects/LivingEntities/Monsters/Slime.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs index fa84566..5b89e48 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs @@ -12,12 +12,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { public class Slime : CoreEnemy { -<<<<<<< HEAD private bool isGoRight = true; private bool isDown = true; -======= - private bool isDown = false; ->>>>>>> main int leftBorder; int rightBorder; bool isAttaking = false; From ab0947ed699e27529436c710905d1c20558a7163 Mon Sep 17 00:00:00 2001 From: Kaktus200020 Date: Fri, 18 Aug 2023 13:11:49 +0300 Subject: [PATCH 8/8] SlimeJumper --- .../LivingEntities/Monsters/Slime.cs | 69 ++++++++++++++----- .../LivingEntities/Monsters/Spider.cs | 2 +- DangerousD/GameCore/Managers/AppManager.cs | 8 +-- 3 files changed, 58 insertions(+), 21 deletions(-) diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs index 5b89e48..ac2240a 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs @@ -12,8 +12,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { public class Slime : CoreEnemy { + private bool isGoRight = true; private bool isDown = true; + + + int leftBorder; int rightBorder; bool isAttaking = false; @@ -30,6 +34,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters rightBorder = 400; //acceleration = Vector2.Zero; delay = 30; + } protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "SlimeMoveLeftTop", "SlimeMoveLeftBottom", "SlimeMoveRightTop", @@ -40,7 +45,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { } - public void Jump() + public void Jump(GameTime gameTime) { var getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle(0, 0, 100, 100)); velocity.X = 0; @@ -56,17 +61,19 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if (delay <= 0) { - velocity = new Vector2(5, -3); + velocity = new Vector2(5, -4); acceleration.Y = 0; + if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpLeftBottom") { GraphicsComponent.StartAnimation("SlimeJumpLeftBottom"); } getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y - 5, 48, 5)); - if (getCols.Count > 0) + if (getCols.Count > 0 ) { isJumping = false; isDown = false; + isAttaking = false; } } @@ -81,7 +88,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if (delay <= 0) { - velocity = new Vector2(-5, -3); + velocity = new Vector2(-5, -4); acceleration.Y = 0; if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpRightBottom") { @@ -92,6 +99,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters { isJumping = false; isDown = false; + isAttaking = false; } } } @@ -106,19 +114,22 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters if (delay <= 0) { - velocity = new Vector2(5, 3); + velocity = new Vector2(5, 4); acceleration.Y = 0; + if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpLeftTop") { GraphicsComponent.StartAnimation("SlimeJumpLeftTop"); } getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X+1, (int)Pos.Y + Height, 46, 5)); - if (getCols.Count > 0) + if (getCols.Count > 0 ) { isJumping = false; isDown = true; + isAttaking = false; acceleration.Y = 10; + Move(gameTime); } } @@ -132,24 +143,28 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters delay--; if (delay <= 0) { - velocity = new Vector2(-5, 3); + velocity = new Vector2(-5, 4); acceleration.Y = 0; + if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpRightTop") { GraphicsComponent.StartAnimation("SlimeJumpRightTop"); } getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X+1, (int)Pos.Y + Height, 46, 5)); - if (getCols.Count > 0) + if (getCols.Count > 0 ) { isJumping = false; isDown = true; + isAttaking = false; acceleration.Y = 10; + Move(gameTime); } } } + } public override void Draw(SpriteBatch spriteBatch) @@ -246,25 +261,27 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters acceleration.Y = -acceleration.Y; } } - Attack(); - - if (!isJumping) + AppManager.Instance.DebugHUD.Set(name, isAttaking.ToString()); + if(!isJumping) { if (isDown) { - Jump(); + Jump(gameTime); } else if(IsInAim()) { - Jump(); + Jump(gameTime); + isAttaking = true; } - else + else if(!isAttaking) { Move(gameTime); + } - + else { Jump(gameTime); } } + base.Update(gameTime); } @@ -283,6 +300,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X + Width, (int)Pos.Y + Height, 200, 500), false); if (getCols.Count > 0) { + return true; } } @@ -291,10 +309,29 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 200, (int)Pos.Y + Height, 200, 500), false); if (getCols.Count > 0) { + return true; } } - + /*/else if (isGoRight && isDown) + { + getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X +Width, (int)Pos.Y -500, 200, 500), false); + if (getCols.Count > 0) + { + isAttaking = true; + return true; + } + } + else if (!isGoRight && isDown) + { + getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 200, (int)Pos.Y - 500, 200, 500), false); + if (getCols.Count > 0) + { + isAttaking = true; + return true; + } + }/*/ + return false; } diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs index a4963bf..f2c9d50 100644 --- a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs @@ -30,11 +30,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters isDownUp = true; isDown = true; physicsManager = AppManager.Instance.GameManager.physicsManager; - web = new SpiderWeb(Pos); name = "Spider"; Width = 112; Height = 24; delay = 0; + web = new SpiderWeb(new Vector2(Pos.X-Width/2,Pos.Y)); webLength = 0; monster_speed = 3; acceleration = new Vector2(0, -50); diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 7b79e45..e79cebc 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -205,12 +205,12 @@ namespace DangerousD.GameCore case GameState.Lobby: break; case GameState.Game: -<<<<<<< HEAD + GameManager.mapManager.LoadLevel("map"); -======= - GameManager.mapManager.LoadLevel("lvl"); + + GameManager.FindBorders(); ->>>>>>> main + break; case GameState.Death: break;