Door render

This commit is contained in:
Mootfrost777 2023-08-18 11:12:25 +03:00
parent 5f032d527b
commit 99585effd2
8 changed files with 141 additions and 194 deletions

View file

@ -21,18 +21,6 @@
/processorParam:TextureFormat=Compressed /processorParam:TextureFormat=Compressed
/build:ButtonFont.spritefont /build:ButtonFont.spritefont
#begin checkboxs_off-on.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:checkboxs_off-on.png
#begin checkboxs_off.png #begin checkboxs_off.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor
@ -45,6 +33,18 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:checkboxs_off.png /build:checkboxs_off.png
#begin checkboxs_off-on.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:checkboxs_off-on.png
#begin checkboxs_on.png #begin checkboxs_on.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor
@ -87,6 +87,18 @@
/processorParam:Quality=Best /processorParam:Quality=Best
/build:DoomTestSong.mp3 /build: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 #begin Font_12.spritefont
/importer:FontDescriptionImporter /importer:FontDescriptionImporter
/processor:FontDescriptionProcessor /processor:FontDescriptionProcessor
@ -235,18 +247,6 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:textboxbackground1-1.png /build:textboxbackground1-1.png
#begin textboxbackground2-1.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:textboxbackground2-1.png
#begin textboxbackground2,5-1.png #begin textboxbackground2,5-1.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor
@ -259,6 +259,18 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:textboxbackground2,5-1.png /build:textboxbackground2,5-1.png
#begin textboxbackground2-1.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:textboxbackground2-1.png
#begin textboxbackground6-1.png #begin textboxbackground6-1.png
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor

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,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="13" nextobjectid="79">
<tileset firstgid="1" source="map.tsx"/> <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"> <tileset firstgid="872" source="Door.tsx"/>
<layer id="1" name="Collidable" class="StopTile" width="30" height="20" visible="0" offsetx="-352.033" offsety="192.098">
<data encoding="csv"> <data encoding="csv">
<chunk x="0" y="-16" width="16" height="16"> <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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -311,137 +312,7 @@
</chunk> </chunk>
</data> </data>
</layer> </layer>
<layer id="4" name="Background 2" class="Tile" width="30" height="20" visible="0" locked="1"> <layer id="6" name="Ladders" class="Platform" width="30" height="20">
<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,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,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">
<data encoding="csv"> <data encoding="csv">
<chunk x="-16" y="0" width="16" height="16"> <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,
@ -466,7 +337,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,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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 +388,7 @@
</chunk> </chunk>
</data> </data>
</layer> </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"> <data encoding="csv">
<chunk x="-16" y="-16" width="16" height="16"> <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, 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
@ -559,15 +430,15 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,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,144,144,144, 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,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,191,192,157,157,149,152,157,157,157,157,157,157,258,
157,157,157,157,157,157,157,265,266,157,157,157,696,697,157,271, 157,157,157,157,157,157,157,150,153,157,157,157,696,697,157,271,
204,204,204,204,204,204,204,278,279,204,204,204,709,710,204,284, 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, 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, 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,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,258,157,157,157,149,152,157,157,157,157,
157,157,157,157,157,157,271,157,157,157,265,266,157,696,697,157, 157,157,157,157,157,157,271,157,157,157,150,153,157,696,697,157,
157,157,272,204,204,204,284,204,204,204,278,279,204,709,710,204, 157,157,272,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,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,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, 157,157,157,157,157,157,157,157,157,157,157,167,157,157,209,210,
@ -589,25 +460,25 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,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,144,144,144, 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, 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>
<chunk x="48" y="-16" width="16" height="16"> <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, 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, 144,144,144,144,144,144,144,144,79,80,144,144,144,0,0,0,
157,157,157,157,157,157,157,157,634,635,157,157,157,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,647,648,157,272,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, 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, 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, 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, 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, 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, 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,265,266,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,278,279,204,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, 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, 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, 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>
<chunk x="-16" y="0" width="16" height="16"> <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, 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
@ -633,9 +504,9 @@
29,29,29,29,0,0,0,0,0,0,0,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,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,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,180,157,149,152,157,157,157,260,157,
29,29,29,29,0,0,157,193,157,265,266,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,278,279,204,272,157,260,157, 6,29,29,29,0,0,204,204,204,151,154,204,272,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,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,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, 29,29,29,29,0,0,157,157,157,157,157,157,157,219,220,221,
@ -657,15 +528,15 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,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,144,144,144, 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,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, 157,149,152,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, 218,150,153,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, 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,
0,0,0,0,0,0,0,0,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>
<chunk x="32" y="0" width="16" height="16"> <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, 237,238,157,157,150,153,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, 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, 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, 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, 157,157,157,157,157,157,157,157,157,243,157,157,209,210,211,212,
@ -682,26 +553,26 @@
0,0,0,0,0,0,0,0,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>
<chunk x="48" y="0" width="16" height="16"> <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, 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,278,279,231,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, 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, 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,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,157,157,157,149,152,157,0,0,0,
157,157,157,147,199,148,157,217,157,157,265,266,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,278,279,204,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, 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, 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,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, 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,265,266,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,278,279,204,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,
0,0,0,0,0,0,0,0,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>
</data> </data>
</layer> </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"> <object id="26" x="265" y="469.5">
<point/> <point/>
</object> </object>
@ -756,4 +627,16 @@
<point/> <point/>
</object> </object>
</objectgroup> </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> </map>

View file

@ -6,21 +6,34 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Xna.Framework.Graphics;
namespace DangerousD.GameCore.GameObjects.Entities namespace DangerousD.GameCore.GameObjects.Entities
{ {
public class Door : Entity 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) public override void Update(GameTime gameTime)
{ {
base.Update(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) public override void OnCollision(GameObject gameObject)
{ {
base.OnCollision(gameObject); base.OnCollision(gameObject);

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

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