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 0000000..ef28f51 Binary files /dev/null and b/DangerousD/Content/spriteDiamond.png differ diff --git a/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs b/DangerousD/GameCore/GameObjects/LivingEntities/Diamond.cs index e7492a0..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)) {