merged sd last fixes

This commit is contained in:
SergoDobro 2023-08-18 12:06:07 +03:00
commit 8338f7910c
15 changed files with 307 additions and 224 deletions

View file

@ -81,6 +81,25 @@
/processorParam:TextureFormat=Color
/build:deathBackground.jpg
#begin DoomTestSong.mp3
/importer:Mp3Importer
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:sounds/DoomTestSong.mp3
#begin doors.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:doors.png
#begin Font_12.spritefont
/importer:FontDescriptionImporter
/processor:FontDescriptionProcessor

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.2" name="Door" tilewidth="32" tileheight="48" tilecount="2" columns="2">
<image source="door.png" width="64" height="48"/>
</tileset>

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

View file

@ -1,7 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="11" nextobjectid="49">
<tileset firstgid="1" source="map.tsx"/>
<layer id="1" name="Collision" class="StopTile" width="30" height="20" visible="0" offsetx="-352.033" offsety="192.098">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="15" nextobjectid="80">
<tileset firstgid="1" name="map" tilewidth="16" tileheight="16" tilecount="871" columns="13">
<image source="tiles.BMP" width="208" height="1072"/>
</tileset>
<tileset firstgid="872" name="Door" tilewidth="32" tileheight="48" tilecount="2" columns="2">
<image source="doors.png" width="64" height="48"/>
</tileset>
<tileset firstgid="874" source="../../../../../Desktop/deathAnimation.tsx"/>
<layer id="1" name="Collidable" class="StopTile" width="30" height="20" offsetx="-352.033" offsety="192.098">
<data encoding="csv">
<chunk x="0" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -31,13 +37,13 @@
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,272,0,272,0,0,0,0,0,0,0,0,0,0,
52,52,52,52,0,52,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,
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,272,0,0,0,0,0,0,0
</chunk>
<chunk x="32" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -135,13 +141,13 @@
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,272,0,0,0,0,0,272,0,0,0,0,0,0,0,0,
52,52,0,0,0,0,0,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,
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,
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,
@ -311,137 +317,7 @@
</chunk>
</data>
</layer>
<layer id="4" name="Background 2" class="Tile" width="30" height="20" visible="0" locked="1">
<data encoding="csv">
<chunk x="0" y="0" width="16" height="16">
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,149,152,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,150,153,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,151,154,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,149,152,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,150,153,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,151,154,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
</chunk>
<chunk x="16" y="0" width="16" height="16">
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,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,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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,
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,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
</chunk>
<chunk x="32" y="16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,150,153,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,151,154,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,149,152,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,150,153,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,151,154,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,149,152,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,150,153,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,151,154,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
</chunk>
</data>
</layer>
<layer id="6" name="Ladders" class="Platform" width="30" height="20" visible="0" locked="1">
<layer id="6" name="Ladders" class="Platform" width="30" height="20">
<data encoding="csv">
<chunk x="-16" y="0" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -466,7 +342,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,147,199,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,
@ -517,7 +393,7 @@
</chunk>
</data>
</layer>
<layer id="3" name="Backgrond" class="Tile" width="30" height="20" visible="0" locked="1" offsetx="-256.033" offsety="256.098">
<layer id="3" name="Backgrond" class="Tile" width="30" height="20" offsetx="-256.033" offsety="256.098">
<data encoding="csv">
<chunk x="-16" y="-16" width="16" height="16">
29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
@ -543,13 +419,13 @@
29,29,29,29,0,0,157,157,167,157,157,157,157,157,260,157,
29,29,29,29,0,0,157,157,180,157,254,255,157,157,260,157,
29,29,29,29,0,0,157,157,193,157,267,268,157,157,260,157,
29,29,29,29,0,0,204,204,204,204,280,281,204,272,260,272,
29,29,29,29,0,0,204,204,204,204,280,281,204,0,260,0,
29,29,29,29,0,0,147,199,148,0,0,0,0,0,260,0,
29,29,29,29,0,0,147,199,148,144,144,144,144,144,260,144,
29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,204,272,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,204,0,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,0,0,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,144,144,157,157,157,260,157,
29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157,
@ -559,15 +435,15 @@
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,178,179,157,157,157,157,157,157,157,157,157,157,157,
157,157,157,191,192,157,157,252,253,157,157,157,157,157,157,258,
157,157,157,157,157,157,157,265,266,157,157,157,696,697,157,271,
204,204,204,204,204,204,204,278,279,204,204,204,709,710,204,284,
157,157,157,191,192,157,157,149,152,157,157,157,157,157,157,258,
157,157,157,157,157,157,157,150,153,157,157,157,696,697,157,271,
204,204,204,204,204,204,204,151,154,204,204,204,709,710,204,284,
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,157,157,157,157,157,157,157,157,
157,157,157,157,157,157,258,157,157,157,252,253,157,157,157,157,
157,157,157,157,157,157,271,157,157,157,265,266,157,696,697,157,
157,157,272,204,204,204,284,204,204,204,278,279,204,709,710,204,
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,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,
157,157,157,157,157,157,157,157,157,157,157,167,157,157,209,210,
@ -589,25 +465,25 @@
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,
211,212,157,157,157,157,157,157,157,157,157,157,157,157,157,157,
224,225,157,157,252,253,157,248,249,157,157,258,157,157,157,157
224,225,157,157,149,152,157,248,249,157,157,258,157,157,157,157
</chunk>
<chunk x="48" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
144,144,144,144,144,144,144,144,621,622,144,144,144,0,0,0,
157,157,157,157,157,157,157,157,634,635,157,157,157,0,0,0,
157,248,249,157,157,157,272,157,647,648,157,272,157,0,0,0,
144,144,144,144,144,144,144,144,79,80,144,144,144,0,0,0,
157,157,157,157,157,157,157,157,92,93,157,157,157,0,0,0,
157,248,249,157,157,157,272,157,105,106,157,272,157,0,0,0,
157,250,251,157,157,157,145,147,199,200,148,145,157,0,0,0,
204,239,240,204,204,204,204,160,199,200,161,204,204,0,0,0,
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,0,0,0,
178,179,157,157,157,157,157,243,157,157,157,157,157,0,0,0,
191,192,157,157,157,157,157,256,257,157,252,253,157,0,0,0,
157,157,157,157,157,157,157,269,270,157,265,266,157,0,0,0,
204,204,204,204,204,204,204,282,283,204,278,279,204,0,0,0,
191,192,157,157,157,157,157,256,257,157,149,152,157,0,0,0,
157,157,157,157,157,157,157,269,270,157,150,153,157,0,0,0,
204,204,204,204,204,204,204,282,283,204,151,154,204,0,0,0,
0,0,0,147,199,148,0,0,0,0,0,0,0,0,0,0,
144,144,144,147,199,148,144,144,144,144,144,144,144,0,0,0,
157,157,157,147,199,148,157,243,157,157,157,157,157,0,0,0,
254,255,157,147,199,148,157,256,257,157,252,253,157,0,0,0
254,255,157,147,199,148,157,256,257,157,149,152,157,0,0,0
</chunk>
<chunk x="-16" y="0" width="16" height="16">
29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
@ -629,13 +505,13 @@
</chunk>
<chunk x="0" y="0" width="16" height="16">
29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157,
29,29,29,29,0,0,160,200,161,204,204,272,157,157,260,157,
29,29,29,29,0,0,160,200,161,204,204,0,157,157,260,157,
29,29,29,29,0,0,0,0,0,0,0,0,157,157,260,157,
29,29,29,29,0,0,144,144,144,144,144,144,157,157,260,157,
29,29,29,29,0,0,157,167,157,157,157,157,157,157,260,157,
29,29,29,29,0,0,157,180,157,252,253,157,157,157,260,157,
29,29,29,29,0,0,157,193,157,265,266,157,157,157,260,157,
6,29,29,29,0,0,204,204,204,278,279,204,272,157,260,157,
29,29,29,29,0,0,157,180,157,149,152,157,157,157,260,157,
29,29,29,29,0,0,157,193,157,150,153,157,157,157,260,157,
6,29,29,29,0,0,204,204,204,151,154,204,0,157,260,157,
29,29,29,29,0,0,0,0,0,0,0,0,0,157,260,157,
29,29,29,29,0,0,144,144,144,144,144,144,144,157,260,157,
29,29,29,29,0,0,157,157,157,157,157,157,157,219,220,221,
@ -647,7 +523,7 @@
</chunk>
<chunk x="16" y="0" width="16" height="16">
157,157,157,157,267,268,157,696,697,157,157,193,157,157,235,236,
157,272,204,204,280,281,204,709,710,204,204,204,204,204,204,204,
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,
@ -657,15 +533,15 @@
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,
157,252,253,157,157,258,157,157,256,257,157,222,223,224,225,157,
218,265,266,157,157,271,157,157,269,270,157,235,236,237,238,157,
231,278,279,204,204,284,204,204,282,283,204,204,204,204,204,204,
157,149,152,157,157,258,157,157,256,257,157,222,223,224,225,157,
218,150,153,157,157,271,157,157,269,270,157,235,236,237,238,157,
231,151,154,204,204,284,204,204,282,283,204,204,204,204,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
</chunk>
<chunk x="32" y="0" width="16" height="16">
237,238,157,157,265,266,157,250,251,157,157,271,157,157,157,157,
204,204,204,204,278,279,204,239,240,204,204,284,204,204,204,204,
237,238,157,157,150,153,157,250,251,157,157,271,157,157,157,157,
204,204,204,204,151,154,204,239,240,204,204,284,204,204,204,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,157,243,157,157,209,210,211,212,
@ -682,26 +558,26 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</chunk>
<chunk x="48" y="0" width="16" height="16">
267,268,157,147,199,148,157,269,270,157,265,266,218,0,0,0,
280,281,204,160,200,161,204,282,283,204,278,279,231,0,0,0,
267,268,157,147,199,148,157,269,270,157,150,153,218,0,0,0,
280,281,204,160,200,161,204,282,283,204,151,154,231,0,0,0,
0,0,0,147,199,148,0,0,0,0,0,0,0,0,0,0,
144,144,144,147,199,148,144,144,144,144,144,144,144,0,0,0,
157,157,157,147,199,148,157,157,157,157,157,157,157,0,0,0,
157,157,157,147,199,148,157,157,157,157,252,253,157,0,0,0,
157,157,157,147,199,148,157,217,157,157,265,266,157,0,0,0,
204,204,204,160,200,161,204,230,204,204,278,279,204,0,0,0,
157,157,157,147,199,148,157,157,157,157,149,152,157,0,0,0,
157,157,157,147,199,148,157,217,157,157,150,153,157,0,0,0,
204,204,204,160,200,161,204,230,204,204,151,154,204,0,0,0,
0,0,0,147,199,148,0,0,0,0,0,0,0,0,0,0,
144,144,144,147,199,148,144,144,144,144,144,144,144,0,0,0,
157,157,159,160,200,161,162,157,157,157,157,157,157,0,0,0,
157,171,172,173,199,174,175,176,157,157,252,253,157,0,0,0,
183,184,185,186,199,187,188,189,190,157,265,266,157,0,0,0,
196,197,198,199,199,200,201,202,203,204,278,279,204,0,0,0,
157,171,172,173,199,174,175,176,157,157,149,152,157,0,0,0,
183,184,185,186,199,187,188,189,190,157,150,153,157,0,0,0,
196,197,198,199,199,200,201,202,203,204,151,154,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,0,0,0
</chunk>
</data>
</layer>
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie" visible="0">
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie">
<object id="26" x="265" y="469.5">
<point/>
</object>
@ -756,4 +632,16 @@
<point/>
</object>
</objectgroup>
<objectgroup id="12" name="Doors" class="Entities.Door">
<object id="69" gid="873" x="640" y="64" width="32" height="48"/>
<object id="70" gid="872" x="672" y="192" width="32" height="48"/>
<object id="71" gid="872" x="672" y="288" width="32" height="48"/>
<object id="72" gid="872" x="672" y="480" width="32" height="48"/>
<object id="73" gid="872" x="672" y="384" width="32" height="48"/>
<object id="74" gid="872" x="320" y="288" width="32" height="48"/>
<object id="75" gid="872" x="160" y="192" width="32" height="48"/>
<object id="76" gid="872" x="112" y="96" width="32" height="48"/>
<object id="77" gid="872" x="16" y="480" width="32" height="48"/>
<object id="78" gid="872" x="-112" y="384" width="32" height="48"/>
</objectgroup>
</map>

View file

@ -6,21 +6,34 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework.Graphics;
namespace DangerousD.GameCore.GameObjects.Entities
{
public class Door : Entity
{
public Door(Vector2 position) : base(position)
private Rectangle _sourceRectangle;
public Door(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position)
{
_sourceRectangle = sourceRectangle;
Width = (int)size.X;
Height = (int)size.Y;
}
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "SilasBallMove" }, "SilasBallMove");
protected override GraphicsComponent GraphicsComponent { get; } = new("doors");
public override void Update(GameTime gameTime)
{
base.Update(gameTime);
}
public override void Draw(SpriteBatch spriteBatch)
{
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch, _sourceRectangle);
//spriteBatch.Draw(debugTexture, new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X, Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height), Color.White);
}
public override void OnCollision(GameObject gameObject)
{
base.OnCollision(gameObject);
@ -29,7 +42,8 @@ namespace DangerousD.GameCore.GameObjects.Entities
Player player = (Player)gameObject;
if (player.isUping)
{
AppManager.Instance.GameManager.Remove(this);
//тут спавн лута
}
}
}

View file

@ -0,0 +1,13 @@
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
namespace DangerousD.GameCore.GameObjects.Entities.Items;
public class Coin : Entity
{
public Coin(Vector2 position) : base(position)
{
}
protected override GraphicsComponent GraphicsComponent { get; }
}

View file

@ -0,0 +1,13 @@
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
namespace DangerousD.GameCore.GameObjects.Entities.Items;
public class Diamond : Entity
{
public Diamond(Vector2 position) : base(position)
{
}
protected override GraphicsComponent GraphicsComponent { get; }
}

View file

@ -12,7 +12,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class Slime : CoreEnemy
{
private bool isDown = false;
private bool isGoRight = true;
private bool isDown = true;
int leftBorder;
int rightBorder;
bool isAttaking = false;
@ -37,13 +38,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Attack()
{
}
public void Jump()
{
var getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle(0, 0, 100, 100));
velocity.X = 0;
Height = 32;
if (isGoRight && isDown)
{
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpLeftBottom")
@ -53,8 +55,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
delay--;
if (delay <= 0)
{
isJumping = true;
velocity = new Vector2(5, -3);
acceleration.Y = 0;
if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpLeftBottom")
{
GraphicsComponent.StartAnimation("SlimeJumpLeftBottom");
@ -70,17 +73,19 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
else if (!isGoRight && isDown)
{
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpRightTop")
if (GraphicsComponent.GetCurrentAnimation != "SlimeReadyJumpRightBottom")
{
GraphicsComponent.StartAnimation("SlimeReadyJumpRightTop");
GraphicsComponent.StartAnimation("SlimeReadyJumpRightBottom");
}
delay--;
if (delay <= 0)
{
velocity = new Vector2(-5, -3);
if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpRightTop")
acceleration.Y = 0;
if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpRightBottom")
{
GraphicsComponent.StartAnimation("SlimeJumpRightTop");
GraphicsComponent.StartAnimation("SlimeJumpRightBottom");
}
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y - 5, 48, 5));
if (getCols.Count > 0)
@ -100,17 +105,20 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
delay--;
if (delay <= 0)
{
isJumping = true;
velocity = new Vector2(5, 3);
acceleration.Y = 0;
if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpLeftTop")
{
GraphicsComponent.StartAnimation("SlimeJumpLeftTop");
}
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5));
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X+1, (int)Pos.Y + Height, 46, 5));
if (getCols.Count > 0)
{
isJumping = false;
isDown = true;
acceleration.Y = 10;
}
}
@ -125,15 +133,18 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
if (delay <= 0)
{
velocity = new Vector2(-5, 3);
acceleration.Y = 0;
if (GraphicsComponent.GetCurrentAnimation != "SlimeJumpRightTop")
{
GraphicsComponent.StartAnimation("SlimeJumpRightTop");
}
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5));
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X+1, (int)Pos.Y + Height, 46, 5));
if (getCols.Count > 0)
{
isJumping = false;
isDown = true;
acceleration.Y = 10;
}
}
@ -143,8 +154,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Draw(SpriteBatch spriteBatch)
{
spriteBatch.Draw(debugTexture, new Rectangle((int)Pos.X, (int)Pos.Y - 5, 48, 5), Color.White);
spriteBatch.Draw(debugTexture, new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5), Color.White);
base.Draw(spriteBatch);
}
public override void Death()
@ -196,15 +207,24 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
velocity.X = -monster_speed;
}
if (Pos.X >= rightBorder)
var getCols= AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y + Height / 2 - 2, 50, 2)); ;
if (isGoRight)
{
isGoRight = false;
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y + Height / 2 - 2, 51, 2));
}
else if (Pos.X <= leftBorder)
else
{
isGoRight = true;
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X-3, (int)Pos.Y + Height / 2 - 2, 51, 2));
}
foreach(var item in getCols)
{
if(item is MapObject)
{
isGoRight = !isGoRight;
break;
}
}
}
public override void Update(GameTime gameTime)
@ -226,8 +246,25 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
acceleration.Y = -acceleration.Y;
}
}
//if (!isAttaking){ Move(gameTime); }
Attack();
if (!isJumping)
{
if (isDown)
{
Jump();
}
else if(IsInAim())
{
Jump();
}
else
{
Move(gameTime);
}
}
base.Update(gameTime);
}
@ -236,10 +273,45 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
}
public bool IsInAim()
{
var getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y + Height, 48, 5));
if (isGoRight && !isDown)
{
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;
}
}
else if (!isGoRight && !isDown)
{
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;
}
}
return false;
}
public override void Attack(GameTime gameTime)
{
}
public override void OnCollision(GameObject gameObject)
{
if (gameObject is Player)
{
if (AppManager.Instance.GameManager.players[0].IsAlive)
{
AppManager.Instance.GameManager.players[0].Death(name);
}
}
base.OnCollision(gameObject);
}
}
}

View file

@ -123,6 +123,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
if (AppManager.Instance.GameManager.players[0].IsAlive)
{
Attack();
}
}
base.OnCollision(gameObject);

View file

@ -12,29 +12,58 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public class Particle : LivingEntity
{
int delay;
bool isFall;
public Particle(Vector2 position) : base(position)
{
Width = 14;
Height = 14;
Random random = new Random();
velocity = new Vector2(random.Next(3, 15), random.Next(3,30));
velocity = new Vector2(random.Next(-6, 6), random.Next(-8,4));
acceleration.Y = 10;
delay = 100;
isFall = false;
isOnGround = false;
}
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "GibsMoveLeftBottom", "GibsMoveLeftTop", "GibsMoveRightBottom", "GibsMoveRightTop" }, "GibsMoveRightTop");
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "GibsMoveLeftBottom", "GibsMoveLeftTop", "GibsMoveRightBottom", "GibsMoveRightTop", "GibsNotMove" }, "GibsMoveRightTop");
public override void Update(GameTime gameTime)
{
delay--;
if (velocity.X > 0)
if (delay<=80)
{
velocity.X--;
velocity.X=0;
}
if(velocity.Y<=0)
if(isOnGround)
{
GraphicsComponent.StartAnimation("GipsNoMove");
GraphicsComponent.StartAnimation("GibsNotMove");
Width = 16;
Height = 5;
isFall=true;
; }
else if(!isFall)
{
Width = 14;
Height= 14;
if (velocity.Y<0 && velocity.X>0)
{
GraphicsComponent.StartAnimation("GibsMoveRightTop");
}
else if (velocity.Y < 0 && velocity.X < 0)
{
GraphicsComponent.StartAnimation("GibsMoveLeftTop");
}
else if (velocity.Y > 0 && velocity.X > 0)
{
GraphicsComponent.StartAnimation("GibsMoveRightBottom");
}
else if (velocity.Y > 0 && velocity.X < 0)
{
GraphicsComponent.StartAnimation("GibsMoveLeftBottom");
}
}
if(delay<=0)
{
AppManager.Instance.GameManager.Remove(this);

View file

@ -237,23 +237,25 @@ namespace DangerousD.GameCore.Graphics
public static void SetCameraPosition(Vector2 playerPosition)
{
CameraPosition = (playerPosition).ToPoint();
CameraPosition.X -= 300;
CameraPosition.Y -= 200;
if (CameraPosition.X < AppManager.Instance.GameManager.CameraBorder.X)
{
CameraPosition.X = (int)AppManager.Instance.GameManager.CameraBorder.X;
}
CameraPosition.X -= 200;
CameraPosition.Y -= 120;
if (CameraPosition.X > AppManager.Instance.GameManager.CameraBorder.Y - 460)
{
CameraPosition.X = (int)AppManager.Instance.GameManager.CameraBorder.Y - 460;
}
if (CameraPosition.Y < AppManager.Instance.GameManager.CameraBorder.Z)
{
CameraPosition.Y = (int)AppManager.Instance.GameManager.CameraBorder.Z;
}
if (CameraPosition.Y > AppManager.Instance.GameManager.CameraBorder.W - 470)
if (CameraPosition.X < AppManager.Instance.GameManager.CameraBorder.X)
{
CameraPosition.Y = (int)AppManager.Instance.GameManager.CameraBorder.W - 470;
CameraPosition.X = (int)AppManager.Instance.GameManager.CameraBorder.X;
}
if (CameraPosition.Y > AppManager.Instance.GameManager.CameraBorder.W - 240)
{
CameraPosition.Y = (int)AppManager.Instance.GameManager.CameraBorder.W - 240;
}
AppManager.Instance.DebugHUD.Set("CameraPosition", $"{CameraPosition.X}, {CameraPosition.Y}");
}

View file

@ -204,9 +204,9 @@ namespace DangerousD.GameCore
break;
case GameState.Lobby:
break;
case GameState.Game:
case GameState.Game:
GameManager.mapManager.LoadLevel("lvl");
GameManager.FindBorders();
GameManager.FindBorders();
break;
case GameState.Death:
break;

View file

@ -177,11 +177,11 @@ namespace DangerousD.GameCore
}
if (item.Pos.Y < CameraBorder.Z)
{
CameraBorder.Z = item.Pos.X;
CameraBorder.Z = item.Pos.Y;
}
if (item.Pos.Y > CameraBorder.W)
{
CameraBorder.W = item.Pos.X;
CameraBorder.W = item.Pos.Y;
}
}
}

View file

@ -9,15 +9,18 @@ using Microsoft.Xna.Framework.Graphics;
using System.Xml.Serialization;
using DangerousD.GameCore.GameObjects;
using System.Globalization;
using System.IO;
using DangerousD.GameCore.GameObjects.Entities;
using DangerousD.GameCore.GameObjects.LivingEntities;
namespace DangerousD.GameCore.Managers
{
public class MapManager
{
private int _columns;
private int _scale;
private int _columns;
public MapManager(int scale)
{
_scale = scale;
@ -78,6 +81,7 @@ namespace DangerousD.GameCore.Managers
private void LoadTilesData()
{
XmlDocument xml = new();
xml.Load($"../../../Content/map.tsx");
XmlNode root = xml.DocumentElement;
@ -102,6 +106,11 @@ namespace DangerousD.GameCore.Managers
{
inst = (Entity)Activator.CreateInstance(type, pos, false);
}
else if (type.Equals(typeof(Door)))
{
int gid = entity.Attributes["gid"] is not null ? int.Parse(entity.Attributes["gid"].Value) : 0;
inst = (Entity)Activator.CreateInstance(type, pos, new Vector2(32, 48), new Rectangle((gid - 872)*32, 0, 32, 48));
}
else
{
inst = (Entity)Activator.CreateInstance(type, pos);

View file

@ -142,14 +142,18 @@ namespace DangerousD.GameCore.Managers
}
private void CheckCollisionsE_LE(List<Entity> entities, List<LivingEntity> livingEntities)
{
foreach (var entity in entities)
for (int i = 0; i < entities.Count; i++)
{
foreach (var livingEntity in livingEntities)
for (int j = 0; j < livingEntities.Count; j++)
{
if (livingEntity.Rectangle.Intersects(entity.Rectangle))
if (livingEntities[j].Rectangle.Intersects(entities[i].Rectangle))
{
livingEntity.OnCollision(entity);
entity.OnCollision(livingEntity);
livingEntities[j].OnCollision(entities[i]);
entities[i].OnCollision(livingEntities[j]);
}
}
}
@ -273,6 +277,21 @@ namespace DangerousD.GameCore.Managers
}
return intersected;
}
public List<GameObject> CheckRectangle(Rectangle rectangle, bool player)
{
var gameObjects = AppManager.Instance.GameManager.GetPlayer1;
List<GameObject> intersected = new List<GameObject>();
if (gameObjects.Rectangle.Intersects(rectangle))
{
intersected.Add(gameObjects);
}
return intersected;
}
public List<GameObject> CheckRectangle(Rectangle rectangle)
{
var gameObjects = AppManager.Instance.GameManager.mapObjects;