diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index b32dbb2..2075f19 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -46,6 +46,18 @@ /processorParam:TextureFormat=Compressed /build:Font2.spritefont +#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 PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png /importer:TextureImporter /processor:TextureProcessor diff --git a/DangerousD/Content/MonstersAnimations.png b/DangerousD/Content/MonstersAnimations.png new file mode 100644 index 0000000..01d185c Binary files /dev/null and b/DangerousD/Content/MonstersAnimations.png differ diff --git a/DangerousD/Content/animations/FrankMoveLeft b/DangerousD/Content/animations/FrankMoveLeft new file mode 100644 index 0000000..c1b8078 --- /dev/null +++ b/DangerousD/Content/animations/FrankMoveLeft @@ -0,0 +1 @@ +{"id":"FrankMoveLeft","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":413,"Width":56,"Height":80},"frameSecond":[{"Item1":0,"Item2":18}],"textureFrameInterval":1,"framesCount":4,"isCycle":true} diff --git a/DangerousD/Content/animations/FrankMoveRight b/DangerousD/Content/animations/FrankMoveRight new file mode 100644 index 0000000..b6fed48 --- /dev/null +++ b/DangerousD/Content/animations/FrankMoveRight @@ -0,0 +1 @@ +{"id":"FrankMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":332,"Width":56,"Height":80},"frameSecond":[{"Item1":0,"Item2":18}],"textureFrameInterval":1,"framesCount":4,"isCycle":true} diff --git a/DangerousD/Content/animations/ZombieMoveRight b/DangerousD/Content/animations/ZombieMoveRight index c59cd6f..7adccea 100644 --- a/DangerousD/Content/animations/ZombieMoveRight +++ b/DangerousD/Content/animations/ZombieMoveRight @@ -1 +1 @@ -{"id":"ZombieMoveRight","textureName":"animation1","startSpriteRectangle":{"X":1,"Y":9,"Width":24,"Height":40},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":4,"isCycle":true} +{"id":"ZombieMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":9,"Width":24,"Height":40},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":4,"isCycle":true} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/FlameSkull.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/FlameSkull.cs new file mode 100644 index 0000000..c521c2e --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/FlameSkull.cs @@ -0,0 +1,37 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class FlameSkull : CoreEnemy + { + public FlameSkull(Vector2 position) : base(position) + { + + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "FlameSkullMoveLeft", "FlameSkullMoveRight" }, "FlameSkullMoveRight"); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Frank.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Frank.cs new file mode 100644 index 0000000..cab454c --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Frank.cs @@ -0,0 +1,53 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + internal class Frank : CoreEnemy + { + private bool isGoRight = false; + public Frank(Vector2 position) : base(position) + { + Width = 56; + Height = 80; + GraphicsComponent.StartAnimation("FrankMoveLeft"); + monster_speed = 50; + } + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "FrankMoveRight", "FrankMoveLeft" }, "FrankMoveRight"); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + if (isGoRight) + { + if (GraphicsComponent.GetCurrentAnimation != "FrankMoveRight") + { + GraphicsComponent.StartAnimation("FrankMoveRight"); + } + } + else if (!isGoRight) + { + if (GraphicsComponent.GetCurrentAnimation != "FrankMoveLeft") + { + GraphicsComponent.StartAnimation("FrankMoveLeft"); + } + } + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Ghost.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Ghost.cs new file mode 100644 index 0000000..b8827b1 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Ghost.cs @@ -0,0 +1,36 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class Ghost : CoreEnemy + { + public Ghost(Vector2 position) : base(position) + { + + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "GhostMoveRight", "GhostMoveLeft", "GhostSpawn", "GhostAttack" }, ""); + + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Hunchman.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Hunchman.cs new file mode 100644 index 0000000..cc6ecd5 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Hunchman.cs @@ -0,0 +1,36 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class Hunchman : CoreEnemy + { + public Hunchman(Vector2 position) : base(position) + { + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "HunchmanMoveLeft", "HunchmanMoveRight", "HunchmanAttackLeft", "HunchmanAttackRight" }, "HunchmanMoveRight"); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasHands.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasHands.cs new file mode 100644 index 0000000..6c13e1b --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasHands.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + internal class SilasHands + { + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs new file mode 100644 index 0000000..4a5d727 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/SilasMaster.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class SilasMaster + { + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs new file mode 100644 index 0000000..9f3f936 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Slime.cs @@ -0,0 +1,38 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class Slime : CoreEnemy + { + public Slime(Vector2 position) : base(position) + { + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "SlimeMoveLeftTop", "SlimeMoveLeftBottom", "SlimeMoveRightTop", + "SlimeMoveRightBottom", "SlimeReadyJumpRightBottom", "SlimeReadyJumpRightTop", "SlimeReadyJumpLeftBottom", "SlimeReadyJumpLeftTop", "SlimeJumpRightBottom", + "SlimeJumpRightTop", "SlimeJumpLeftBottom", "SlimeJumpLeftTop" }, ""); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs new file mode 100644 index 0000000..9513d71 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Spider.cs @@ -0,0 +1,36 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class Spider : CoreEnemy + { + public Spider(Vector2 position) : base(position) + { + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "SpiderMoveRight", "SpiderMoveLeft", "SpiderDown", "SpiderUp" }, ""); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Werewolf.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Werewolf.cs new file mode 100644 index 0000000..91af742 --- /dev/null +++ b/DangerousD/GameCore/GameObjects/LivingEntities/Monsters/Werewolf.cs @@ -0,0 +1,36 @@ +using DangerousD.GameCore.Graphics; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters +{ + public class Werewolf : CoreEnemy + { + public Werewolf(Vector2 position) : base(position) + { + } + + protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "WolfMoveRight", "WolfMoveLeft", "WolfJumpRight", "WolfJumpLeft" }, ""); + + public override void Attack() + { + + } + + public override void Death() + { + + } + + public override void Move(GameTime gameTime) + { + + } + } +} diff --git a/DangerousD/GameCore/Levels/Level1.cs b/DangerousD/GameCore/Levels/Level1.cs index 1716044..835674c 100644 --- a/DangerousD/GameCore/Levels/Level1.cs +++ b/DangerousD/GameCore/Levels/Level1.cs @@ -13,6 +13,7 @@ namespace DangerousD.GameCore.Levels var Трава = new GrassBlock(new Vector2(0, 128)); var Death = new TestAnimationDeath(new Vector2(128, 128)); var Zombie = new Zombie(new Vector2(256, 128)); + var Frank = new Frank(new Vector2(384, 128)); } } }