Diamond_Version 1.0

This commit is contained in:
Lev 2023-08-18 15:55:53 +03:00
parent 0bedfaf39d
commit 38b07b87a9
4 changed files with 35 additions and 33 deletions

View file

@ -14,17 +14,12 @@
#---------------------------------- Content ---------------------------------# #---------------------------------- Content ---------------------------------#
#begin MonstersAnimations.png #begin ButtonFont.spritefont
/importer:TextureImporter /importer:FontDescriptionImporter
/processor:TextureProcessor /processor:FontDescriptionProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True /processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False /processorParam:TextureFormat=Compressed
/processorParam:MakeSquare=False /build:ButtonFont.spritefont
/processorParam:TextureFormat=Color
/build:MonstersAnimations.png
#begin deathAnimation.png #begin deathAnimation.png
/importer:TextureImporter /importer:TextureImporter
@ -38,13 +33,6 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:deathAnimation.png /build:deathAnimation.png
#begin ButtonFont.spritefont
/importer:FontDescriptionImporter
/processor:FontDescriptionProcessor
/processorParam:PremultiplyAlpha=True
/processorParam:TextureFormat=Compressed
/build:ButtonFont.spritefont
#begin DoomTestSong.mp3 #begin DoomTestSong.mp3
/importer:Mp3Importer /importer:Mp3Importer
/processor:SoundEffectProcessor /processor:SoundEffectProcessor
@ -84,19 +72,6 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:menuFon.jpg /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 #begin MenuFon2.jpg
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor
@ -121,6 +96,30 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:menuFon3.jpg /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 #begin tiles.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor

View file

@ -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"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View file

@ -1,5 +1,5 @@
using System; using System;
using System.Collections.Generic;
using DangerousD.GameCore.Graphics; using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
@ -8,12 +8,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public class Diamond : Entity public class Diamond : Entity
{ {
protected override GraphicsComponent GraphicsComponent => throw new NotImplementedException(); protected override GraphicsComponent GraphicsComponent { get; } = new GraphicsComponent(new List<string>() { "spriteDiamond" }, "spriteDiamond");
public Diamond(Vector2 position) : base(position) public Diamond(Vector2 position) : base(position)
{ {
} }
public void Update(Player player) public void Update(Player player)
{ {
if (Rectangle.Intersects(player.Rectangle)) if (Rectangle.Intersects(player.Rectangle))