GUI fixes and merges

This commit is contained in:
SergoDobro 2023-08-18 13:37:52 +03:00
commit f19b02f3bc
64 changed files with 1972 additions and 444 deletions

View file

@ -21,18 +21,6 @@
/processorParam:TextureFormat=Compressed
/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
/importer:TextureImporter
/processor:TextureProcessor
@ -45,6 +33,18 @@
/processorParam:TextureFormat=Color
/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
/importer:TextureImporter
/processor:TextureProcessor
@ -81,11 +81,24 @@
/processorParam:TextureFormat=Color
/build:deathBackground.jpg
#begin DoomTestSong.mp3
/importer:Mp3Importer
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:DoomTestSong.mp3
/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
@ -230,6 +243,18 @@
/processorParam:TextureFormat=Color
/build:sliderBackground.png
#begin sounds/DoomTestSong.mp3
/importer:Mp3Importer
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:sounds/DoomTestSong.mp3
#begin sounds/shotgun_shot.mp3
/importer:Mp3Importer
/processor:SoundEffectProcessor
/processorParam:Quality=Best
/build:sounds/shotgun_shot.mp3
#begin textboxbackground1-1.png
/importer:TextureImporter
/processor:TextureProcessor
@ -242,18 +267,6 @@
/processorParam:TextureFormat=Color
/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
/importer:TextureImporter
/processor:TextureProcessor
@ -266,6 +279,18 @@
/processorParam:TextureFormat=Color
/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
/importer:TextureImporter
/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.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View file

@ -0,0 +1 @@
{"id":"GibsMoveLeftBottom","textureName":"MonstersAnimations","startSpriteRectangle":{"X":70,"Y":724,"Width":14,"Height":11},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"GibsMoveLeftTop","textureName":"MonstersAnimations","startSpriteRectangle":{"X":2,"Y":721,"Width":14,"Height":12},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"GibsMoveRightBottom","textureName":"MonstersAnimations","startSpriteRectangle":{"X":106,"Y":722,"Width":13,"Height":12},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"GibsMoveRightTop","textureName":"MonstersAnimations","startSpriteRectangle":{"X":37,"Y":721,"Width":14,"Height":13},"frameSecond":[{"Item1":0,"Item2":6}],"textureFrameInterval":1,"framesCount":2,"isCycle":true,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"GibsNotMove","textureName":"MonstersAnimations","startSpriteRectangle":{"X":137,"Y":731,"Width":16,"Height":5},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":1,"isCycle":true,"offset":"0, 0"}

View file

@ -1 +1 @@
{"id":"HunchmanAttackLeft","textureName":"MonstersAnimations","startSpriteRectangle":{"X":101,"Y":124,"Width":40,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"0, 0"}
{"id":"HunchmanAttackLeft","textureName":"MonstersAnimations","startSpriteRectangle":{"X":112,"Y":124,"Width":27,"Height":24},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"4, 0"}

View file

@ -1 +1 @@
{"id":"HunchmanAttackRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":101,"Y":99,"Width":40,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"0, 0"}
{"id":"HunchmanAttackRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":102,"Y":99,"Width":31,"Height":24},"frameSecond":[{"Item1":0,"Item2":8}],"textureFrameInterval":1,"framesCount":3,"isCycle":true,"offset":"8, 0"}

View file

@ -1,3 +1 @@
{"id":"HunchmanMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":99,"Width":24,"Height":24},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":4,"isCycle":true,"offset":"0, 0"}
{"id":"HunchmanMoveRight","textureName":"MonstersAnimations","startSpriteRectangle":{"X":1,"Y":100,"Width":24,"Height":23},"frameSecond":[{"Item1":0,"Item2":10}],"textureFrameInterval":1,"framesCount":4,"isCycle":true,"offset":"0, 0"}

View file

@ -0,0 +1 @@
{"id":"playerReload","textureName":"playerAnimation","startSpriteRectangle":{"X":101,"Y":67,"Width":24,"Height":32},"frameSecond":[{"Item1":0,"Item2":12}],"textureFrameInterval":1,"framesCount":2,"isCycle":false,"offset":"0, 0"}

View file

@ -0,0 +1,24 @@
{
"id": "playerShootLeft",
"textureName": "playerAnimation",
"startSpriteRectangle": {
"X": 201,
"Y": 34,
"Width": 32,
"Height": 32
},
"frameSecond": [
{
"Item1": 0,
"Item2": 3
},
{
"Item1": 1,
"Item2": 20
}
],
"textureFrameInterval": 1,
"framesCount": 2,
"isCycle": false,
"offset": "4, 0"
}

View file

@ -0,0 +1,24 @@
{
"id": "playerShootRight",
"textureName": "playerAnimation",
"startSpriteRectangle": {
"X": 201,
"Y": 1,
"Width": 32,
"Height": 32
},
"frameSecond": [
{
"Item1": 0,
"Item2": 3
},
{
"Item1": 1,
"Item2": 20
}
],
"textureFrameInterval": 1,
"framesCount": 2,
"isCycle": false,
"offset": "4, 0"
}

162
DangerousD/Content/boss.tmx Normal file
View file

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="200" height="200" tilewidth="16" tileheight="16" infinite="1" nextlayerid="4" nextobjectid="3">
<tileset firstgid="1" source="../../../../../Desktop/DangerousD map/map.tsx"/>
<layer id="1" name="Слой тайлов 1" class="StopTile" width="200" height="200">
<data encoding="csv">
<chunk x="-16" y="-32" 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,799,799,799,799,799,799,799,799,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0
</chunk>
<chunk x="0" y="-32" 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,
799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="-32" 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,
799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="-32" 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,
799,799,799,799,799,799,799,799,799,799,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0
</chunk>
<chunk x="-16" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,799,799,799,799,799,799,799,799
</chunk>
<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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799
</chunk>
<chunk x="16" 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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
799,799,799,799,799,799,799,799,799,799,799,799,799,799,799,799
</chunk>
<chunk x="32" y="-16" width="16" height="16">
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,799,0,0,0,0,0,
799,799,799,799,799,799,799,799,799,799,799,0,0,0,0,0
</chunk>
</data>
</layer>
<objectgroup id="2" name="Слой объектов 1" class="LivingEntities">
<object id="1" name="DEBUGUS" type="Player" x="293.333" y="-126.667">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Слой объектов 2" class="LivingEntities.Monsters">
<object id="2" type="SilasMaster" x="82.6667" y="-186.667">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,373 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="200" height="200" tilewidth="16" tileheight="16" infinite="1" nextlayerid="8" nextobjectid="49">
<tileset firstgid="1" source="../Documents/Github_repos/DangerousD/DangerousD/Content/map.tsx"/>
<layer id="3" name="Слой тайлов 3" class="Tile" width="200" height="200">
<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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570
</chunk>
<chunk x="16" 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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570
</chunk>
<chunk x="0" y="0" width="16" height="16">
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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">
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="1" name="Collidable" class="StopTile" width="200" height="200">
<data encoding="csv">
<chunk x="-32" 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,50,50,50,50,50,
0,0,0,0,0,0,0,0,0,0,0,50,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,50,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,49,49,49,49,49,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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,
50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="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,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="48" 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,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,
49,49,49,49,49,49,49,49,49,49,49,49,49,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="7" name="Player" class="LivingEntities">
<object id="42" name="DEBUGUS" type="Player" x="236.506" y="-54.4681">
<point/>
</object>
</objectgroup>
<objectgroup id="6" name="Zombies" class="LivingEntities.Monsters.Zombie">
<object id="17" x="568" y="130">
<point/>
</object>
<object id="18" x="614" y="126">
<point/>
</object>
<object id="19" x="656" y="137">
<point/>
</object>
<object id="20" x="688" y="124">
<point/>
</object>
<object id="21" x="739" y="128">
<point/>
</object>
<object id="22" x="754" y="127">
<point/>
</object>
<object id="23" x="777" y="125">
<point/>
</object>
<object id="24" x="803" y="127">
<point/>
</object>
<object id="25" x="834" y="128">
<point/>
</object>
<object id="26" x="867" y="124">
<point/>
</object>
<object id="27" x="876" y="123">
<point/>
</object>
<object id="28" x="909" y="114">
<point/>
</object>
<object id="29" x="933" y="108">
<point/>
</object>
<object id="30" x="931" y="65">
<point/>
</object>
<object id="31" x="880" y="74">
<point/>
</object>
<object id="32" x="829" y="76">
<point/>
</object>
<object id="33" x="804" y="78">
<point/>
</object>
<object id="34" x="772" y="78">
<point/>
</object>
<object id="35" x="740" y="77">
<point/>
</object>
<object id="36" x="713" y="73">
<point/>
</object>
<object id="37" x="684" y="73">
<point/>
</object>
<object id="38" x="659" y="75">
<point/>
</object>
<object id="39" x="632" y="82">
<point/>
</object>
<object id="40" x="612" y="89">
<point/>
</object>
<object id="41" x="604" y="92">
<point/>
</object>
</objectgroup>
<layer id="2" name="Слой тайлов 2" class="Tile" width="200" height="200">
<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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0
</chunk>
<chunk x="16" 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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370
</chunk>
<chunk x="0" y="0" width="16" height="16">
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
369,370,0,0,0,0,0,0,0,0,369,370,0,0,0,0,
382,383,0,0,0,0,0,0,0,0,382,383,0,0,0,0,
395,396,0,0,0,0,0,0,0,0,395,396,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,369,370,0,0,0,0,0,0,0,0,369,370,
0,0,0,0,382,383,0,0,0,0,0,0,0,0,382,383,
0,0,0,0,395,396,0,0,0,0,0,0,0,0,395,396,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="5" name="Various enemies" class="LivingEntities.Monsters">
<object id="7" type="SilasMaster" x="126" y="-25">
<point/>
</object>
<object id="8" type="Frank" x="425" y="60">
<point/>
</object>
<object id="10" type="FrankBalls" x="413" y="50">
<point/>
</object>
<object id="11" type="FrankBalls" x="439" y="52">
<point/>
</object>
<object id="12" type="FlameSkull" x="649" y="-17">
<point/>
</object>
<object id="13" type="Slime" x="-178" y="118">
<point/>
</object>
<object id="15" type="Spider" x="-94" y="109.333">
<point/>
</object>
</objectgroup>
</map>

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" locked="1" 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,
@ -130,19 +136,19 @@
0,0,0,0,0,0,0,0,0,0,13,75,0,0,0,0
</chunk>
<chunk x="16" y="0" width="16" height="16">
52,0,0,0,52,0,0,0,52,52,52,52,52,52,52,52,
52,0,0,0,0,0,0,0,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,
52,52,0,0,52,0,0,52,52,52,52,52,52,52,52,52,
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,
52,52,52,0,52,0,52,52,52,52,52,52,52,52,52,52,
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,
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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,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
</chunk>
<chunk x="32" 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,79,80,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,92,93,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,105,106,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,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
</chunk>
<chunk x="-16" 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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,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,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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="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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,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
</chunk>
<chunk x="16" y="16" width="16" height="16">
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,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,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" 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" locked="1">
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie">
<object id="26" x="265" y="469.5">
<point/>
</object>
@ -752,8 +628,20 @@
</object>
</objectgroup>
<objectgroup id="10" name="Player" class="LivingEntities.Player">
<object id="47" x="-525" y="461.333">
<object id="47" x="-500" y="461.333">
<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

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="200" height="200" tilewidth="16" tileheight="16" infinite="1" nextlayerid="5" nextobjectid="5">
<tileset firstgid="1" source="../Desktop/DangerousD map/map.tsx"/>
<layer id="1" name="Слой тайлов 1" class="StopTile" width="200" height="200">
<data encoding="csv">
<chunk x="-16" y="0" width="16" height="16">
294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294
</chunk>
<chunk x="0" y="0" width="16" height="16">
294,294,294,294,294,321,321,321,321,321,321,321,321,321,321,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,321,321,321,321,321,321,321,321,321,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,321,
294,294,294,294,321,321,321,321,321,321,321,321,321,321,321,321
</chunk>
</data>
</layer>
<objectgroup id="755" name="Zombies" class="LivingEntities.Player" locked="1">
<object id="26" x="-50" y="100">
<point/>
</object>
</objectgroup>
<objectgroup id="2" name="Слой объектов 1" class="LivingEntities.Monsters.FlameSkull">
<object id="1" x="1" y="100">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Слой объектов 2" class="LivingEntities.Monsters.FrankBalls">
<object id="2" x="1" y="100">
<point/>
</object>
</objectgroup>
<objectgroup id="4" name="Слой объектов 3" class="LivingEntities.Monsters.Frank">
<object id="3" x="-56" y="100">
<point/>
</object>
</objectgroup>
<objectgroup id="5" name="Zombies" class="LivingEntities.Monsters.Spider">
<object id="4" x="-80" y="100">
<point/>
</object>
</objectgroup>
<objectgroup id="2" name="Слой объектов 1" class="LivingEntities.Monsters.Slime">
<object id="5" x="1" y="100">
<point/>
</object>
</objectgroup>
</map>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

View file

@ -1,8 +1,14 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
namespace DangerousD.GameCore.GUI;
@ -10,6 +16,10 @@ public abstract class AbstractGui : IDrawableObject
{
protected UIManager Manager = new();
protected List<DrawableUIElement> Elements = new();
private List<DrawableUIElement> ActiveElements;
protected DrawableUIElement SelectedElement;
private bool isStartedPrint = false;
private bool isPressed = false;
public AbstractGui()
{
@ -20,8 +30,17 @@ public abstract class AbstractGui : IDrawableObject
public virtual void Initialize()
{
Manager.Initialize(AppManager.Instance.GraphicsDevice);
this.graphicsDevice = graphicsDevice;
CreateUI();
ActiveElements = new List<DrawableUIElement>();
foreach (var element in Elements)
{
if (CheckOnBadElements(element))
{
ActiveElements.Add(element);
}
}
if (ActiveElements.Count > 0) { SelectedElement = ActiveElements.First(); }
}
public virtual void LoadContent()
@ -31,11 +50,163 @@ public abstract class AbstractGui : IDrawableObject
public virtual void Update(GameTime gameTime)
{
Manager.Update();
string state = AppManager.Instance.InputManager.currentControlsState;
if (ActiveElements.Count != 0)
{
if (state == "Gamepad")
{
GamePadState gamePadState = GamePad.GetState(0);
GamepadInput(gamePadState);
}
else if (state == "Keyboard" || state == "Mouse")
{
KeyboardState keyBoardState = Keyboard.GetState();
KeyBoardInput(keyBoardState);
}
}
Manager.Update(gameTime);
if (SelectedElement is not null)
{
if (SelectedElement is Button)
{
(SelectedElement as Button).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering;
}
if (SelectedElement is ButtonText)
{
(SelectedElement as ButtonText).hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering;
}
if (SelectedElement is TextBox)
{
TextBox box = (TextBox)SelectedElement;
box.hoverState = MonogameLibrary.UI.Enums.HoverState.Hovering;
if (isStartedPrint)
{
box.SelectIt();
}
}
}
}
public virtual void Draw(SpriteBatch spriteBatch)
{
Manager.Draw(spriteBatch);
}
protected virtual void GamepadInput(GamePadState gamePadState)
{
if (gamePadState.DPad.Up == ButtonState.Pressed && !isPressed)
{
isPressed = true;
ChangeSelectedElement(-1);
Debug.WriteLine("switch");
}
else if (gamePadState.DPad.Down == ButtonState.Pressed && !isPressed)
{
isPressed = true;
ChangeSelectedElement(1);
}
else if (gamePadState.Buttons.A == ButtonState.Pressed && !isPressed)
{
isPressed = true;
if (SelectedElement is Button)
{
Button button = SelectedElement as Button;
button.CallLeftBtnEvent();
}
else if (SelectedElement is TextBox)
{
TextBox textBox = SelectedElement as TextBox;
isStartedPrint = true;
}
}
else if (isPressed && (gamePadState.Buttons.A == ButtonState.Released &&
gamePadState.DPad.Down == ButtonState.Released &&
gamePadState.DPad.Up == ButtonState.Released))
{
isPressed = false;
}
}
protected virtual void KeyBoardInput(KeyboardState keyboardState)
{
if (keyboardState.IsKeyDown(Keys.Up) && !isPressed)
{
isPressed = true;
isStartedPrint = false;
ChangeSelectedElement(-1);
}
else if (keyboardState.IsKeyDown(Keys.Down) && !isPressed)
{
isPressed = true;
isStartedPrint = false;
ChangeSelectedElement(1);
}
else if (keyboardState.IsKeyDown(Keys.Enter) && !isPressed)
{
isPressed = true;
if (SelectedElement is Button)
{
Button button = SelectedElement as Button;
button.CallLeftBtnEvent();
}
else if (SelectedElement is TextBox)
{
TextBox textBox = SelectedElement as TextBox;
isStartedPrint = true;
}
}
else if (isPressed && (keyboardState.IsKeyUp(Keys.Enter) &&
keyboardState.IsKeyUp(Keys.Down) &&
keyboardState.IsKeyUp(Keys.Up)))
{
isPressed = false;
}
}
private void ChangeSelectedElement(int x) // Меняет выбранный элемент
{
for (int i = 0; i < ActiveElements.Count; i++)
{
if (ActiveElements[i] == SelectedElement)
{
if (i + x >= ActiveElements.Count)
{
SelectedElement = ActiveElements.First();
return;
}
else
{
if (i + x < 0)
{
SelectedElement = ActiveElements.Last();
return;
}
else
{
SelectedElement = ActiveElements[i + x];
return;
}
}
}
}
}
private bool CheckOnBadElements(DrawableUIElement element)
{
if (element is Button)
{
return true;
}
else if (element is ButtonText)
{
return true;
}
else if (element is TextBox)
{
return true;
}
else return false;
}
}

View file

@ -11,6 +11,7 @@ namespace DangerousD.GameCore.GUI
{
private SpriteFont _spriteFont;
private Dictionary<string, string> _text = new();
private List<string> _log = new();
public void Initialize()
{
@ -27,10 +28,11 @@ namespace DangerousD.GameCore.GUI
public void Draw(SpriteBatch spriteBatch)
{
var keysString = Join("\n", _text.Select(el => el.Key + ": " + el.Value).ToList());
spriteBatch.Begin();
spriteBatch.DrawString(
_spriteFont,
Join("\n", _text.Select(el => el.Key + ": " + el.Value).ToList()),
keysString,
new Vector2(10, 10),
Color.Cyan,
0,
@ -39,6 +41,17 @@ namespace DangerousD.GameCore.GUI
SpriteEffects.None,
0
);
spriteBatch.DrawString(
_spriteFont,
Join("\n", _log),
new Vector2(10, 10 + _spriteFont.MeasureString(keysString).Y),
Color.Green,
0,
Vector2.Zero,
1,
SpriteEffects.None,
0
);
spriteBatch.End();
}
@ -46,5 +59,14 @@ namespace DangerousD.GameCore.GUI
{
_text[key] = value;
}
public void Log(string value)
{
_log.Add(value);
if (_log.Count > 30)
{
_log.RemoveAt(0);
}
}
}
}

View file

@ -14,7 +14,6 @@ namespace DangerousD.GameCore.GUI
{
public class HUD : IDrawableObject
{
public int ammout = 8;
int wigth = AppManager.Instance.inGameResolution.X;
int height = AppManager.Instance.inGameResolution.Y;
float scaler = AppManager.Instance.resolution.Y / (float)AppManager.Instance.inGameHUDHelperResolution.Y;
@ -27,10 +26,18 @@ namespace DangerousD.GameCore.GUI
spriteBatch.Draw(texture, new Rectangle(wigth / 35 - 2, height / 35 - 2, 120 + 2, 70 + 2), Color.DarkRed);
spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 4, height / 30 - 6), Color.Gray, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0);
spriteBatch.DrawString(spriteFont, "AMMO", new Vector2(wigth / 34 + 1, height / 30 - 6), Color.White, 0, Vector2.Zero, 1.8f, SpriteEffects.None, 0);
for (int i = 0; i < ammout; i++)
for (int i = 0; i < 5; i++)
{
if (i <= AppManager.Instance.GameManager.players[0].Bullets)
{
spriteBatch.Draw(texture, new Rectangle(wigth / 30 + i * 13 + 2, height / 17 + 4, 5, 20), new Color(0.8f, 0.8f, 0, 1f));
spriteBatch.Draw(texture, new Rectangle(wigth / 30 + i * 13, height / 17 + 4, 5, 20), Color.Yellow);
}
else
{
spriteBatch.Draw(texture, new Rectangle(wigth / 30 + i * 13, height / 17 + 4, 7, 20), new Color(0.2f, 0.2f, 0, 1f));
}
}
spriteBatch.End();
}

View file

@ -41,6 +41,19 @@ namespace DangerousD.GameCore.GUI
fontName = "ButtonFont"
});
Button backButton = new Button(Manager)
{
rectangle = new Rectangle(screenWidth / 20, screenHeight / 15, (int)(40 * 2.4), (int)(40 * 2.4)),
fontColor = Color.Black,
fontName = "font2",
textureName = "textboxbackground1-1"
};
backButton.LeftButtonPressed += () => {
AppManager.Instance.ChangeGameState(GameState.Menu);
};
Elements.Add(backButton);
// TextBox-ы
{
TextBox loginTextBox = new TextBox(Manager)
@ -69,6 +82,7 @@ namespace DangerousD.GameCore.GUI
loginTextBox.fontColor = Color.Gray;
}
};
Elements.Add(loginTextBox);
TextBox passwordTextBox = new TextBox(Manager)
{
@ -95,6 +109,7 @@ namespace DangerousD.GameCore.GUI
passwordTextBox.fontColor = Color.Gray;
}
};
Elements.Add(passwordTextBox);
}
// Кнопки
@ -114,6 +129,7 @@ namespace DangerousD.GameCore.GUI
AppManager.Instance.ChangeGameState(GameState.Lobby);
}
};
Elements.Add(logButton);
Button regButton = new Button(Manager)
{
@ -126,20 +142,9 @@ namespace DangerousD.GameCore.GUI
};
Elements.Add(regButton);
regButton.LeftButtonPressed += GoToRegWebServer;
Elements.Add(regButton);
Button backButton = new Button(Manager)
{
rectangle = new Rectangle(screenWidth / 20, screenHeight / 15, (int)(40 * 2.4), (int)(40 * 2.4)),
text = "<-",
scale = 0.72f,
fontColor = Color.Black,
fontName = "font2",
textureName = "textboxbackground1-1"
};
Elements.Add(backButton);
backButton.LeftButtonPressed += () => {
AppManager.Instance.ChangeGameState(GameState.Menu);
};
}
foreach (var item in Elements)
{

View file

@ -1,9 +1,12 @@
using DangerousD.GameCore.Managers;
using Microsoft.VisualBasic;
using Microsoft.Xna.Framework;
using MonogameLibrary.UI.Base;
using MonogameLibrary.UI.Elements;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
namespace DangerousD.GameCore.GUI;
@ -11,6 +14,12 @@ namespace DangerousD.GameCore.GUI;
internal class MenuGUI : AbstractGui
{
int selected = 0;
Color[] colors = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52),
new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) };
List<Label> MainLetterLabels = new List<Label>();
List<Label> BigLetterLabels = new List<Label>();
List<Vector2> MainLetterPositions = new List<Vector2>();
List<Vector2> BigLetterPositions = new List<Vector2>();
protected override void CreateUI()
{
int wigth = AppManager.Instance.inGameHUDHelperResolution.X;
@ -21,16 +30,20 @@ internal class MenuGUI : AbstractGui
Elements.Add(menuBackground);
menuBackground.LoadTexture(AppManager.Instance.Content);
Color[] colors = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52),
new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) };
for (int i = 0; i < colors.Length; i++)
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 200, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 1.35f - 0.05f * i * i / 10, fontName = "Font2", fontColor = colors[i] });
{
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 - 60, 220, 50, 50), text = "Dangerous", mainColor = Color.Transparent, scale = 1.35f - 0.05f * i * i / 10, fontName = "Font2", fontColor = colors[i] });
MainLetterLabels.Add(Elements.Last() as Label);
MainLetterPositions.Add(new Vector2(Elements.Last().rectangle.X, Elements.Last().rectangle.Y));
}
int dx = 50;
Color[] colors2 = new Color[] { new Color(64, 53, 51), new Color(84, 58, 52),
new Color(170, 101, 63), new Color(254, 208, 116), new Color(252, 231, 124) };
for (int i = 0; i < colors2.Length; i++)
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 480 + dx - i * i, 260 - i * i / 5, 50, 50), text = "D", mainColor = Color.Transparent, scale = 2.15f - 0.05f * i * i / 5, fontName = "Font2", fontColor = colors2[i] });
for (int i = 0; i < colors.Length; i++)
{
Elements.Add(new Label(Manager) { rectangle = new Rectangle((wigth - 50) / 2 + 480 + dx - i * i, 260 - i * i / 5, 50, 50), text = "D", mainColor = Color.Transparent, scale = 2.15f - 0.05f * i * i / 5, fontName = "Font2", fontColor = colors[i] });
BigLetterLabels.Add(Elements.Last() as Label);
BigLetterPositions.Add(new Vector2(Elements.Last().rectangle.X, Elements.Last().rectangle.Y));
}
var butSingle = new ButtonText(Manager) { rectangle = new Rectangle((wigth - (int)(300 * 2.4)) / 2, 350, (int)(300 * 2.4), (int)(50 * 2.4)), text = "Singleplayer", scale = 1.2f, fontName = "ButtonFont" };
Elements.Add(butSingle);
@ -75,8 +88,27 @@ internal class MenuGUI : AbstractGui
}
}
public override void Update(GameTime gameTime)
{
for (int i = 0; i < MainLetterLabels.Count; i++)
{
MainLetterLabels[i].fontColor = Color.FromNonPremultiplied(colors[i].ToVector4() *
(float)(((Math.Sin(gameTime.TotalGameTime.TotalSeconds * 4) + 1) / 2f) * 0.3 + 0.8f)
);
BigLetterLabels[i].fontColor = Color.FromNonPremultiplied(colors[i].ToVector4()
* (float)(((Math.Sin(gameTime.TotalGameTime.TotalSeconds * 4 - Math.PI) + 1) / 2f) * 0.3 + 0.8f)
);
MainLetterLabels[i].fontColor.A = 255;
BigLetterLabels[i].fontColor.A = 255;
MainLetterLabels[i].rectangle.Y = (int)(MainLetterPositions[i].Y +
(20 * (Math.Sin(gameTime.TotalGameTime.TotalSeconds * 4) + 1) / 2f * 0.25) * (i - MainLetterLabels.Count / 2)
);
BigLetterLabels[i].rectangle.Y = (int)(BigLetterPositions[i].Y +
(20 * (Math.Sin(gameTime.TotalGameTime.TotalSeconds * 4 - Math.PI) + 1) / 2f * 0.25) * (i - MainLetterLabels.Count / 2)
);
}
base.Update(gameTime);
}
}

View file

@ -0,0 +1,51 @@
using DangerousD.GameCore.GameObjects.LivingEntities;
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using System;
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
{
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("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);
if (gameObject is Player)
{
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

@ -1,7 +1,9 @@
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -10,19 +12,22 @@ namespace DangerousD.GameCore.GameObjects.Entities
{
public class SilasBall : LivingEntity
{
private Vector2 v;
public SilasBall(Vector2 position) : base(position)
{
Height = 60;
Width = 60;
Height = 24;
Width = 24;
acceleration = Vector2.Zero;
}
public SilasBall(Vector2 position, Vector2 velosity) : base(position)
{
Height = 60;
Width = 60;
Height = 24;
Width = 24;
acceleration = Vector2.Zero;
velocity = velosity;
v = velosity;
}
@ -30,6 +35,17 @@ namespace DangerousD.GameCore.GameObjects.Entities
public override void Update(GameTime gameTime)
{
base.Update(gameTime);
if (AppManager.Instance.GameManager.physicsManager.CheckRectangle( new Rectangle(Rectangle.X-2,Rectangle.Y-2,Rectangle.Width+8,Rectangle.Height+8)).Count>0)
{
AppManager.Instance.GameManager.Remove(this);
}
velocity = v;
}
public override void Draw(SpriteBatch spriteBatch)
{
base.Draw(spriteBatch);
}
}

View file

@ -0,0 +1,36 @@
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
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.Entities
{
internal class Trigger : Entity
{
public Action<GameObject> OnCollisionAction;
string trigger_Name;
public Trigger(Rectangle rectangle, string trigger_Name) : base(new Vector2(rectangle.X, rectangle.Y))
{
_pos = new Vector2(rectangle.X, rectangle.Y);
Width = rectangle.Width;
Height = rectangle.Height;
this.trigger_Name = trigger_Name;
}
protected override GraphicsComponent GraphicsComponent => new GraphicsComponent(new List<string>() { "SilasBallMove" }, "SilasBallMove");
public override void OnCollision(GameObject gameObject)
{
OnCollisionAction?.Invoke(gameObject);
}
public override void Update(GameTime gameTime)
{
}
public override void Draw(SpriteBatch spriteBatch)
{
}
}
}

View file

@ -15,6 +15,7 @@ namespace DangerousD.GameCore
protected Vector2 _pos;
public Vector2 Pos => _pos;
public int id;
public bool isIdFromHost = false;
public int Width { get; set; }
public int Height { get; set; }
public Rectangle Rectangle => new Rectangle((int)Pos.X, (int)Pos.Y, Width, Height);
@ -58,7 +59,13 @@ namespace DangerousD.GameCore
{
GraphicsComponent.DrawAnimation(Rectangle, spriteBatch);
//debug
//wdaspriteBatch.Draw(debugTexture,new Rectangle(Rectangle.X-GraphicsComponent.CameraPosition.X,Rectangle.Y-GraphicsComponent.CameraPosition.Y,Rectangle.Width,Rectangle.Height), Color.White);
if (AppManager.Instance.InputManager.CollisionsCheat)
{
spriteBatch.Draw(debugTexture,
new Rectangle(Rectangle.X - GraphicsComponent.CameraPosition.X,
Rectangle.Y - GraphicsComponent.CameraPosition.Y, Rectangle.Width, Rectangle.Height),
Color.White);
}
}
}

View file

@ -13,13 +13,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public abstract class CoreEnemy : LivingEntity
{
protected int monster_health;
protected float monster_speed = 2;
protected int monster_speed;
protected string name;
protected bool isAlive = true;
protected bool isAttack = false;
protected bool isGoRight;
protected int leftBoarder = 0;
protected int rightBoarder = 700;
protected int rightBoarder = 800;
protected bool isGoRight;
public CoreEnemy(Vector2 position) : base(position)
{
@ -46,7 +45,5 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
isAlive = false;
}
}
public abstract void Target();
}
}

View file

@ -12,6 +12,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class FlameSkull : CoreEnemy
{
private bool isAttack;
public FlameSkull(Vector2 position) : base(position)
{
Width = 62;
@ -72,11 +74,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Attack(GameTime gameTime)
{
}
public override void Target()
{
throw new NotImplementedException();
}

View file

@ -15,7 +15,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public Frank(Vector2 position) : base(position)
{
isGoRight = false;
Width = 112;
Height = 160;
leftBoarder = 50;
@ -75,7 +74,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -14,7 +14,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
private Rectangle collision;
private Vector2 position;
private int healthBall;
private bool isFlyRight = true;
private bool isAttacking = false;
@ -81,13 +80,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
velocity.Y -= monster_speed;
}
}
public override void Attack(GameTime gameTime)
public void Target()
{
throw new NotImplementedException();
}
public override void Target()
public override void Attack(GameTime gameTime)
{
throw new NotImplementedException();
}

View file

@ -10,6 +10,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class Ghost : CoreEnemy
{
private bool isAttack;
public Ghost(Vector2 position) : base(position)
{
isGoRight = true;
@ -81,7 +83,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -129,7 +129,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
Debug.WriteLine("Collision");
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -42,7 +42,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -1,4 +1,4 @@
using DangerousD.GameCore.Graphics;
 using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
@ -10,13 +10,14 @@ using System.Threading.Tasks;
namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class SilasHands : CoreEnemy
public class
SilasHands : CoreEnemy
{
public SilasHands(Vector2 position) : base(position)
{
name = "SilasHand";
Width = 48;
Height = 48;
Width = 16;
Height = 16;
monster_health = 2;
monster_speed = 2;
acceleration = Vector2.Zero;
@ -32,7 +33,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Attack(GameTime gameTime)
{
throw new NotImplementedException();
}
public override void Death()
@ -61,7 +62,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -16,7 +16,6 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
private int attackTime = 60;
private int moveTime = 360;
private int currentTime = 0;
private bool isGoRight = true;
int leftBorder;
int rightBorder;
List<SilasHands> hands = new List<SilasHands>();
@ -24,21 +23,17 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public SilasMaster(Vector2 position) : base(position)
{
name = "SilasMaster";
Width = 144;
Height = 160;
Width = 48;
Height = 53;
monster_health = 15;
monster_speed = 4;
monster_speed = 2;
acceleration = Vector2.Zero;
leftBorder = (int)position.X - 60;
rightBorder = (int)position.X + 120;
acceleration = Vector2.Zero;
hands.Add(new SilasHands(new Vector2(Pos.X+60,Pos.Y+120)));
hands.Add(new SilasHands(new Vector2(Pos.X + 90, Pos.Y + 120)));
for (int i = 0; i < 4; i++)
{
SilasBall silasball = new SilasBall(new Vector2(Pos.X + i * 40, Pos.Y + 120), new Vector2((i - 2) * 4, 6));
balls.Add(silasball);
}
hands.Add(new SilasHands(new Vector2(Pos.X+0,Pos.Y+53)));
hands.Add(new SilasHands(new Vector2(Pos.X + 24, Pos.Y + 53)));
}
protected override GraphicsComponent GraphicsComponent { get; } = new GraphicsComponent(new List<string>() { "SilasMove", "SilasAttack" }, "SilasMove");
public override void Attack()
@ -64,9 +59,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
private void SpawnAttackBall()
{
for (int i = 0; i < balls.Count; i++)
balls.Clear();
for (int i = 0; i < 4; i++)
{
balls[i].SetPosition(new Vector2(Pos.X + i * 40, Pos.Y + 120));
SilasBall silasball = new SilasBall(new Vector2(Pos.X + i * 12, Pos.Y + 53), new Vector2((i - 2) * 2, 2));
balls.Add(silasball);
}
@ -113,7 +111,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -13,7 +13,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public class Slime : CoreEnemy
{
private bool isGoRight = true;
private bool isDown = false;
private bool isDown = true;
int leftBorder;
int rightBorder;
bool isAttaking = false;
@ -45,6 +45,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
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")
@ -54,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");
@ -71,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)
@ -101,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;
}
}
@ -126,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;
}
}
@ -144,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()
@ -197,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
{
getCols = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X-3, (int)Pos.Y + Height / 2 - 2, 51, 2));
}
else if (Pos.X <= leftBorder)
foreach(var item in getCols)
{
isGoRight = true;
if(item is MapObject)
{
isGoRight = !isGoRight;
break;
}
}
}
public override void Update(GameTime gameTime)
@ -227,20 +246,72 @@ 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);
}
public override void Target()
public void Target()
{
}
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

@ -1,4 +1,6 @@
using DangerousD.GameCore.Graphics;
using DangerousD.GameCore.GameObjects.MapObjects;
using DangerousD.GameCore.Graphics;
using DangerousD.GameCore.Managers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
@ -12,24 +14,31 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class Spider : CoreEnemy
{
private bool isAttack;
protected SpiderWeb web;
protected float delay;
protected int webLength;
protected bool isDown;
protected bool isDownUp;
protected PhysicsManager physicsManager;
protected Player player;
public Spider(Vector2 position) : base(position)
{
player = AppManager.Instance.GameManager.players[0];
isDownUp = true;
isDown = true;
physicsManager = AppManager.Instance.GameManager.physicsManager;
web = new SpiderWeb(Pos);
name = "Spider";
Width = 112;
Height = 24;
delay = 0;
webLength = 0;
monster_speed = 2;
acceleration = Vector2.Zero;
monster_speed = 3;
acceleration = new Vector2(0, -50);
isGoRight = true;
}
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "SpiderMoveRight", "SpiderMoveLeft", "SpiderOnWeb" }, "SpiderMoveRight");
@ -44,6 +53,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
Attack(gameTime);
}
Target();
base.Update(gameTime);
}
@ -59,18 +69,20 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
/// <param name="gameTime"></param>
public override void Attack(GameTime gameTime)
{ //48 72
if (isDownUp)
velocity.X = 0;
delay += (float)gameTime.ElapsedGameTime.TotalSeconds;
if (isAttack)
{
if (delay > 0.5 && webLength <= 4 && isDown)
{
Width = 48;
Height = 72;
delay += (float)gameTime.ElapsedGameTime.TotalSeconds;
if (delay > 0.5 && webLength <= 4 && isDown)
{
StartCicycleAnimation("SpiderOnWeb");
acceleration = Vector2.Zero;
webLength++;
_pos.Y += 25;
web.Height = webLength * 25;
web.SetPosition(new Vector2(_pos.X + Width / 2 - web.Width / 2 + 2, Pos.Y - 25 * webLength));
web.SetPosition(new Vector2(_pos.X + Width / 2 - web.Width / 2, Pos.Y - 25 * webLength));
delay = 0;
if (webLength == 4)
{
@ -79,24 +91,36 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
else if (delay > 0.5 && webLength != 0 && !isDown)
{
Width = 48;
Height = 72;
StartCicycleAnimation("SpiderOnWeb");
webLength--;
_pos.Y -= 25;
web.Height = webLength * 25;
web.SetPosition(new Vector2(_pos.X + Width / 2 - web.Width / 2 + 2, Pos.Y - 25 * webLength));
web.SetPosition(new Vector2(_pos.X + Width / 2 - web.Width / 2, Pos.Y - 25 * webLength));
delay = 0;
if (webLength == 0)
{
isDown = true;
}
}
else
var entitiesInter = physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)Pos.Y, 200, 600));
if (entitiesInter.Count > 0)
{
Width = 112;
Height = 24;
foreach (var entity in entitiesInter)
{
if (entity.GetType() == typeof(Player))
{
player.Death(name);
}
}
}
}
if (webLength == 0)
{
isAttack = false;
}
}
public override void Draw(SpriteBatch spriteBatch)
{
@ -118,6 +142,15 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Move(GameTime gameTime)
{
Width = 112;
Height = 24;
foreach (var entity in physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 7, (int)Pos.Y, 126, 10)))
{
if (entity.GetType() == typeof(StopTile))
{
isGoRight = !isGoRight;
}
}
if (isGoRight)
{
if (GraphicsComponent.GetCurrentAnimation != "SpiderMoveRight")
@ -134,19 +167,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
velocity.X = -monster_speed;
}
if (Pos.X >= rightBoarder)
{
isGoRight = false;
}
else if (Pos.X <= leftBoarder)
{
isGoRight = true;
}
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
if (player.Pos.X >= Pos.X && player.Pos.X <= Pos.X+Width)
{
isAttack = true;
}
}
}
}

View file

@ -43,7 +43,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -12,6 +12,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class Werewolf : CoreEnemy
{
private bool isAttack;
public Werewolf(Vector2 position) : base(position)
{
name = "Wolf";
@ -74,7 +76,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
}
public override void Target()
public void Target()
{
throw new NotImplementedException();
}

View file

@ -13,6 +13,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
{
public class Zombie : CoreEnemy
{
private bool isAttack;
float leftBorder;
float rightBorder;
bool isAttaking = false;
@ -24,8 +26,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
Height = 40;
monster_speed = 3;
name = "Zombie";
leftBorder = (int)position.X - 50;
rightBorder = (int)position.X + 50;
monster_health = 2;
leftBorder = (int)position.X - 100;
rightBorder = (int)position.X + 100;
physicsManager = new PhysicsManager();
Random random = new Random();
if(random.Next(0, 2) == 0)
@ -74,6 +77,12 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
public override void Death()
{
for (int i = 0; i < 3; i++)
{
Particle particle = new Particle(Pos);
}
AppManager.Instance.GameManager.Remove(this);
}
@ -114,22 +123,24 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
if (AppManager.Instance.GameManager.players[0].IsAlive)
{
Attack();
}
}
base.OnCollision(gameObject);
}
public override void Target()
public void Target()
{
if (AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X - 50, (int)Pos.Y, Width + 100, Height), typeof(Player)).Count > 0)
{
if (isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X)
if(isGoRight && this._pos.X <= AppManager.Instance.GameManager.players[0].Pos.X)
{
isTarget = true;
leftBorder = Pos.X - 10;
rightBorder = Pos.X + AppManager.Instance.GameManager.players[0].Pos.X;
}
else if (!isGoRight && this._pos.X >= AppManager.Instance.GameManager.players[0].Pos.X)
else if(!isGoRight && this._pos.X >= AppManager.Instance.GameManager.players[0].Pos.X)
{
isTarget = true;
rightBorder = Pos.X + 10;
@ -148,8 +159,18 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
rightBorder = 760;
}
}
public override void Attack(GameTime gameTime)
{}
public void TakeDamage()
{
monster_health--;
GraphicsComponent.StartAnimation("ZombieRightAttack");
Particle particle = new Particle(Pos);
if (monster_health <= 0)
{
Death();
}
}
}
}

View file

@ -0,0 +1,75 @@
using DangerousD.GameCore.Graphics;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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(-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", "GibsNotMove" }, "GibsMoveRightTop");
public override void Update(GameTime gameTime)
{
delay--;
if (delay<=80)
{
velocity.X=0;
}
if(isOnGround)
{
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);
}
base.Update(gameTime);
}
}
}

View file

@ -8,6 +8,7 @@ using System.Threading.Tasks;
using DangerousD.GameCore.GameObjects.PlayerDeath;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
using DangerousD.GameCore.Network;
namespace DangerousD.GameCore.GameObjects.LivingEntities
@ -25,28 +26,51 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
public int leftBorder;
public bool isVisible = true;
private bool isAttacked = false;
private bool isShooting = false;
public GameObject objectAttack;
private int bullets;
public bool FallingThroughPlatform = false;
public bool isUping = false;
public int Bullets { get { return bullets; } }
public Player(Vector2 position, bool isNetworkPlayer = false) : base(position)
public Player(Vector2 position) : base(position)
{
Width = 16;
Height = 32;
if (!isNetworkPlayer)
{
AppManager.Instance.InputManager.ShootEvent += Shoot;
AppManager.Instance.InputManager.MovEventJump += Jump;
AppManager.Instance.InputManager.MovEventDown += MoveDown;
}
velocity = new Vector2(0, 0);
rightBorder = (int)position.X + 100;
leftBorder = (int)position.X - 100;
bullets = 5;
this.GraphicsComponent.actionOfAnimationEnd += (a) =>
{
if (a == "playerShootLeft" || a == "playerShootRight")
{
isShooting = false;
}
if (a == "playerReload")
{
bullets++;
}
};
}
public bool IsAlive { get { return isAlive; } }
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "playerMoveLeft", "playerMoveRight", "DeathFromZombie", "playerRightStay", "playerStayLeft",
"playerJumpRight" , "playerJumpLeft"}, "playerStayLeft");
"playerJumpRight" , "playerJumpLeft", "playerShootLeft", "playerShootRight", "playerReload"}, "playerReload");
public void Attack()
{
@ -54,6 +78,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
{
isVisible = false;
}
}
public override void OnCollision(GameObject gameObject)
{
@ -68,6 +93,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
public void Death(string monsterName)
{
if (AppManager.Instance.InputManager.InvincibilityCheat)
{
return;
}
isAttacked = true;
if(monsterName == "Zombie")
{
@ -80,6 +109,17 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
};
}
else if(monsterName == "Spider")
{
DeathRectangle deathRectangle = new DeathRectangle(Pos, "DeathFrom" + monsterName);
deathRectangle.Gr.actionOfAnimationEnd += (a) =>
{
if (a == "DeathFrom" + monsterName)
{
AppManager.Instance.ChangeGameState(GameState.Death);
}
};
}
isAlive = false;
}
public void Jump()
@ -92,13 +132,64 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
public void Shoot()
{
if (bullets > 0)
{
if (!isShooting)
{
AppManager.Instance.SoundManager.StartSound("shotgun_shot", Pos, Pos);
isShooting = true;
bullets--;
if (isRight)
{
if (GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
GraphicsComponent.StartAnimation("playerShootRight");
}
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), 100, 10), typeof(Zombie));
if (targets != null)
{
foreach (var target in targets)
{
Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage();
}
}
}
else
{
if (GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
GraphicsComponent.StartAnimation("playerShootRight");
}
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), -100, 10), typeof(Zombie));
if (targets != null)
{
foreach (var target in targets)
{
Zombie targetZombie = (Zombie)target;
targetZombie.TakeDamage();
}
}
}
}
}
}
public override void Update(GameTime gameTime)
{
GraphicsComponent.CameraPosition = (_pos-new Vector2(200, 350)).ToPoint();
if (!isAttacked)
if (AppManager.Instance.InputManager.ScopeState==ScopeState.Up)
{
isUping = true;
}
else
{
isUping = false;
}
if (isOnGround && FallingThroughPlatform)
{
FallingThroughPlatform = false;
}
GraphicsComponent.SetCameraPosition(Pos);
if (!isAttacked || AppManager.Instance.InputManager.InvincibilityCheat)
{
Move(gameTime);
}
@ -113,8 +204,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
{
float delta = (float)gameTime.ElapsedGameTime.TotalSeconds;
velocity.X = 5 * AppManager.Instance.InputManager.VectorMovementDirection.X;
if (GraphicsComponent.GetCurrentAnimation != "playerShootLeft" && GraphicsComponent.GetCurrentAnimation != "playerShootRight")
{
if (AppManager.Instance.InputManager.VectorMovementDirection.X > 0)
{
isRight = true;
if (GraphicsComponent.GetCurrentAnimation != "playerMoveRight")//идёт направо
{
GraphicsComponent.StartAnimation("playerMoveRight");
@ -122,16 +216,29 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
else if (AppManager.Instance.InputManager.VectorMovementDirection.X < 0)//идёт налево
{
isRight = false;
if (GraphicsComponent.GetCurrentAnimation != "playerMoveLeft")
{
GraphicsComponent.StartAnimation("playerMoveLeft");
}
}
else if(AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит
else if (AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит
{
if (GraphicsComponent.GetCurrentAnimation != "ZombieMoveLeft")
if(bullets < 5)
{
GraphicsComponent.StartAnimation("ZombieMoveLeft");
if (GraphicsComponent.GetCurrentAnimation != "playerReload")
{
GraphicsComponent.StartAnimation("playerReload");
}
}
else if (isRight)
{
GraphicsComponent.StartAnimation("playerRightStay");
}
else if (!isRight)
{
GraphicsComponent.StartAnimation("playerStayLeft");
}
}
}
if (AppManager.Instance.multiPlayerStatus != MultiPlayerStatus.SinglePlayer)
@ -142,8 +249,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
}
public void MoveDown()
{
// ПОЧЕМУ
velocity.Y = -11;
FallingThroughPlatform = true;
isOnGround = false;
}
}

View file

@ -7,6 +7,7 @@ public abstract class LivingEntity : Entity
public bool isOnGround = true;
public Vector2 velocity;
public Vector2 acceleration;
public LivingEntity(Vector2 position) : base(position)
{
acceleration = new Vector2(0, 30);

View file

@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using DangerousD.GameCore.Managers;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
@ -16,6 +17,7 @@ namespace DangerousD.GameCore.Graphics
private List<Texture2D> textures;
private List<string> texturesNames;
private AnimationContainer currentAnimation;
static private int scaling = 4;
public AnimationContainer CurrentAnimation
{
get
@ -128,7 +130,7 @@ namespace DangerousD.GameCore.Graphics
{
if (!currentAnimation.IsCycle)
{
if(actionOfAnimationEnd != null)
if (actionOfAnimationEnd != null)
{
actionOfAnimationEnd(currentAnimation.Id);
}
@ -151,10 +153,10 @@ namespace DangerousD.GameCore.Graphics
{
Texture2D texture = textures[texturesNames.FindIndex(x => x == currentAnimation.TextureName)];
float scale;
if (currentAnimation.Offset.X!=0)
if (currentAnimation.Offset.X != 0)
{
destinationRectangle.X -= (int)currentAnimation.Offset.X;
scale=destinationRectangle.Height/sourceRectangle.Height;
scale = destinationRectangle.Height / sourceRectangle.Height;
destinationRectangle.Width = (int)(sourceRectangle.Width * scale);
}
@ -167,6 +169,8 @@ namespace DangerousD.GameCore.Graphics
destinationRectangle.X -= CameraPosition.X;
destinationRectangle.Y -= CameraPosition.Y;
destinationRectangle = Scaling(destinationRectangle);
_spriteBatch.Draw(texture,
destinationRectangle, sourceRectangle, Color.White);
}
@ -191,10 +195,18 @@ namespace DangerousD.GameCore.Graphics
destinationRectangle.X -= CameraPosition.X;
destinationRectangle.Y -= CameraPosition.Y;
destinationRectangle = Scaling(destinationRectangle);
_spriteBatch.Draw(texture,
destinationRectangle, sourceRectangle, Color.White);
}
private Rectangle Scaling(Rectangle destinationRectangle)
{
destinationRectangle.X *= scaling;
destinationRectangle.Y *= scaling;
destinationRectangle.Width *= scaling;
destinationRectangle.Height *= scaling;
return destinationRectangle;
}
private void buildSourceRectangle()
{
sourceRectangle = new Rectangle();
@ -222,6 +234,31 @@ namespace DangerousD.GameCore.Graphics
interval = lastInterval;
}
}
public static Point CameraPosition = new Point(0, 0);
public static void SetCameraPosition(Vector2 playerPosition)
{
CameraPosition = (playerPosition).ToPoint();
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.X < AppManager.Instance.GameManager.CameraBorder.X)
{
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}");
}
public static Point CameraPosition = new Point(-700, 300);
}
}

View file

@ -6,11 +6,12 @@ using System.Diagnostics;
using System.Text;
using System.Xml.Serialization;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
namespace DangerousD.GameCore
{
public enum ScopeState { Up, Middle, Down }
public enum ControlsState { Gamepad, Keyboard, Mouse }
public enum ControlsState { Gamepad, Keyboard }
public class InputManager
{
public delegate void Delegat();
@ -21,31 +22,78 @@ namespace DangerousD.GameCore
Vector2 vectorMovementDirection;
ScopeState scopeState; // Положение оружия. Up, Middle, Down.
ControlsState controlsState;
private bool _overrideControls = false;
private bool _cheatsEnabled = false;
public bool InvincibilityCheat { get; private set; } = false;
public bool CollisionsCheat { get; private set; } = false;
private bool isJumpDown; // Блокирует физическое нажатие прыжка и спуска
private bool isShoot;
public Vector2 VectorMovementDirection { get => vectorMovementDirection; }
public ScopeState ScopeState { get => scopeState; }
public string currentControlsState = "";
public string currentControlsState;
public InputManager()
{
this.isJumpDown = false;
this.isShoot = false;
scopeState = ScopeState.Middle;
controlsState= ControlsState.Mouse;
controlsState= ControlsState.Keyboard;
vectorMovementDirection = new Vector2(0, 0);
}
public void SetState(ControlsState controlsStates)
{
currentControlsState = controlsStates.ToString();
}
public void Update()
{
// Работа с GamePad
if (GamePad.GetState(0).IsConnected)
{
GamePadState gamepadState = GamePad.GetState(0);
if (gamepadState.Triggers.Left >= 0.9 && gamepadState.Triggers.Right >= 0.9)
{
_cheatsEnabled = true;
}
if (_cheatsEnabled)
{
if (gamepadState.Buttons.Y == ButtonState.Pressed)
{
InvincibilityCheat = true;
}
if (gamepadState.Buttons.B == ButtonState.Pressed)
{
CollisionsCheat = true;
}
}
}
{
var keyboardState = Keyboard.GetState();
if (keyboardState.IsKeyDown(Keys.LeftShift) && keyboardState.IsKeyDown(Keys.RightShift))
{
_cheatsEnabled = true;
}
if (_cheatsEnabled)
{
if (keyboardState.IsKeyDown(Keys.I))
{
InvincibilityCheat = true;
}
if (keyboardState.IsKeyDown(Keys.C))
{
CollisionsCheat = true;
}
}
}
if (_cheatsEnabled)
{
AppManager.Instance.DebugHUD.Set("cheats", _cheatsEnabled.ToString());
AppManager.Instance.DebugHUD.Set("invincible", InvincibilityCheat.ToString());
}
// Работа с GamePad
if (_overrideControls ? controlsState == ControlsState.Gamepad : GamePad.GetState(0).IsConnected)
{
controlsState = ControlsState.Gamepad;
// Обработка гейм-пада. Задает Vector2 vectorMovementDirection являющийся вектором отклонения левого стика.
GamePadState gamePadState = GamePad.GetState(0);
vectorMovementDirection = gamePadState.ThumbSticks.Left;
@ -93,12 +141,12 @@ namespace DangerousD.GameCore
{
isShoot = false;
}
SetState(ControlsState.Gamepad);
}
// Работа с KeyBoard
else
{
controlsState = ControlsState.Keyboard;
KeyboardState keyBoardState = Keyboard.GetState(); // Состояние клавиатуры
// Обработка движения вправо-влево. Меняет у вектора vectorMovementDirection значение X на -1/0/1.
@ -158,7 +206,12 @@ namespace DangerousD.GameCore
{
isShoot = false;
}
SetState(ControlsState.Keyboard);
}
}
public void SetState(ControlsState controlsState)
{
currentControlsState = controlsState.ToString();
}
}
}

View file

@ -12,6 +12,7 @@ using MonogameLibrary.UI.Base;
using DangerousD.GameCore.Managers;
using DangerousD.GameCore.GameObjects.LivingEntities;
using DangerousD.GameCore.GameObjects;
using System.Threading.Tasks;
namespace DangerousD.GameCore
{
@ -111,6 +112,8 @@ namespace DangerousD.GameCore
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
if (GameManager.GetPlayer1 != null)
DebugHUD.Set("Objid: ", GameManager.GetPlayer1.id.ToString());
InputManager.Update();
SoundManager.Update();
@ -132,13 +135,13 @@ namespace DangerousD.GameCore
DeathGUI.Update(gameTime);
break;
case GameState.Game:
HUD.Update(gameTime);
GameManager.Update(gameTime);
break;
default:
break;
}
DebugHUD.Update(gameTime);
HUD.Update(gameTime);
base.Update(gameTime);
}
@ -169,6 +172,7 @@ namespace DangerousD.GameCore
_spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp);
GameManager.Draw(_spriteBatch);
_spriteBatch.End();
HUD.Draw(_spriteBatch);
break;
default:
break;
@ -180,7 +184,6 @@ namespace DangerousD.GameCore
DebugHUD.Draw(_spriteBatch);
HUD.Draw(_spriteBatch);
base.Draw(gameTime);
}
@ -199,6 +202,7 @@ namespace DangerousD.GameCore
break;
case GameState.Game:
GameManager.mapManager.LoadLevel("lvl");
GameManager.FindBorders();
break;
case GameState.Death:
break;
@ -221,24 +225,41 @@ namespace DangerousD.GameCore
case NetworkTaskOperationEnum.CreateEntity:
break;
case NetworkTaskOperationEnum.SendPosition:
if (networkTask.objId != GameManager.GetPlayer1.id)
{
LivingEntity entity = GameManager.livingEntities.Find(x => x.id == networkTask.objId);
entity.SetPosition(networkTask.position);
if (multiPlayerStatus == MultiPlayerStatus.Host)
{
NetworkTasks.Add(networkTask);
}
}
break;
case NetworkTaskOperationEnum.ChangeState:
break;
case NetworkTaskOperationEnum.ConnectToHost:
Player connectedPlayer = new Player(Vector2.Zero);
Player connectedPlayer = new Player(Vector2.Zero, true);
NetworkTasks.Add(new NetworkTask(connectedPlayer.id));
NetworkTask task = new NetworkTask();
NetworkTasks.Add(task.AddConnectedPlayer(GameManager.GetPlayer1.id, GameManager.GetPlayer1.Pos));
foreach (Player player in GameManager.players)
{
if (player.id != connectedPlayer.id)
{
NetworkTasks.Add(task.AddConnectedPlayer(player.id, player.Pos));
}
}
break;
case NetworkTaskOperationEnum.GetClientPlayerId:
if (!GameManager.GetPlayer1.isIdFromHost)
{
GameManager.GetPlayer1.id = networkTask.objId;
GameManager.GetPlayer1.isIdFromHost = true;
}
break;
case NetworkTaskOperationEnum.AddConnectedPlayer:
Player remoteConnectedPlayer = new Player(networkTask.position);
Player remoteConnectedPlayer = new Player(networkTask.position, true);
remoteConnectedPlayer.id = networkTask.objId;
GameManager.players.Add(remoteConnectedPlayer);
break;
default:
break;

View file

@ -28,7 +28,7 @@ namespace DangerousD.GameCore
public PhysicsManager physicsManager;
public List<Player> players;
public List<GameObject> otherObjects = new();
public Vector4 CameraBorder;
public Player GetPlayer1 { get; private set; }
public GameManager()
{
@ -42,6 +42,7 @@ namespace DangerousD.GameCore
players = new List<Player>();
mapManager = new MapManager(1);
physicsManager = new PhysicsManager();
CameraBorder = Vector4.Zero;
}
@ -83,6 +84,36 @@ namespace DangerousD.GameCore
otherObjects.Add(gameObject);
}
}
public void Remove(GameObject gameObject)
{
GetAllGameObjects.Remove(gameObject);
if (gameObject is Player objPl)
{
livingEntities.Remove(gameObject as LivingEntity);
players.Remove(objPl);
}
else if (gameObject is LivingEntity objLE)
{
livingEntities.Remove(objLE);
}
else if (gameObject is Entity objE)
{
entities.Remove(objE);
}
else if (gameObject is MapObject obj)
{
if (obj.IsColliderOn)
mapObjects.Remove(obj);
else
BackgroundObjects.Remove(obj);
}
else
{
otherObjects.Remove(gameObject);
}
}
public void Draw(SpriteBatch _spriteBatch)
{
foreach (var item in BackgroundObjects)
@ -99,7 +130,6 @@ namespace DangerousD.GameCore
public void Update(GameTime gameTime)
{
AppManager.Instance.DebugHUD.Set("playerId: ", GetPlayer1.id.ToString());
if (AppManager.Instance.NetworkTasks.Count > 0)
{
AppManager.Instance.NetworkManager.SendMsg(AppManager.Instance.NetworkTasks.ToList());
@ -117,21 +147,43 @@ namespace DangerousD.GameCore
{
livingEntitiesWithoutPlayers[i].Update(gameTime);
}
GetPlayer1.Update(gameTime);
}
else
{
for (int i = 0; i < livingEntitiesWithoutPlayers.Count; i++)
{
livingEntitiesWithoutPlayers[i].PlayAnimation();
}
GetPlayer1.Update(gameTime);
}
GetPlayer1.Update(gameTime);
foreach (var item in otherObjects)
item.Update(gameTime);
physicsManager.UpdateCollisions(entities, livingEntities, mapObjects, gameTime);
physicsManager.UpdateCollisions(entities, livingEntities, mapObjects, players, gameTime);
}
public void FindBorders()
{
foreach (var item in GetAllGameObjects)
{
if (item.Pos.X<CameraBorder.X)
{
CameraBorder.X = item.Pos.X;
}
if (item.Pos.X > CameraBorder.Y)
{
CameraBorder.Y = item.Pos.X;
}
if (item.Pos.Y < CameraBorder.Z)
{
CameraBorder.Z = item.Pos.Y;
}
if (item.Pos.Y > CameraBorder.W)
{
CameraBorder.W = item.Pos.Y;
}
}
}
}
}

View file

@ -9,13 +9,17 @@ 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)
{
@ -70,27 +74,14 @@ namespace DangerousD.GameCore.Managers
Rectangle sourceRect = new(new Point((tiles[i] -1) % _columns, (tiles[i] -1) / _columns) * tileSize.ToPoint(), tileSize.ToPoint());
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.MapObjects.{tileType}");
Activator.CreateInstance(type, pos, tileSize * _scale, sourceRect);
/*switch (tileType)
{
case "collidable":
new StopTile(pos, tileSize * _scale, sourceRect);
break;
case "platform":
new Platform(pos, tileSize * _scale, sourceRect);
break;
case "non_collidable":
new Tile(pos, tileSize * _scale, sourceRect);
break;
}*/
}
}
}
}
private void LoadTilesData()
{
XmlDocument xml = new();
xml.Load($"../../../Content/map.tsx");
XmlNode root = xml.DocumentElement;
@ -100,13 +91,30 @@ namespace DangerousD.GameCore.Managers
private void InstantiateEntities(XmlNode group)
{
string entityType = group.Attributes["class"].Value;
string entityGroup = group.Attributes["class"] is not null ? group.Attributes["class"].Value : "";
float offsetX = group.Attributes["offsetx"] is not null ? float.Parse(group.Attributes["offsetx"].Value) : 0;
float offsetY = group.Attributes["offsety"] is not null ? float.Parse(group.Attributes["offsety"].Value) : 0;
foreach (XmlNode entity in group.ChildNodes)
{
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityType}");
Entity inst = (Entity)Activator.CreateInstance(type, new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX, float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY) * _scale);
string entityType = entity.Attributes["type"] is not null ? "." + entity.Attributes["type"].Value : "";
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityGroup}{entityType}");
Vector2 pos =
new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX,
float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY) * _scale;
Entity inst;
if (type.Equals(typeof(Player)))
{
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);
}
inst.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height));
inst.Height *= _scale;
inst.Width *= _scale;

View file

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DangerousD.GameCore.GameObjects.LivingEntities;
using DangerousD.GameCore.GameObjects.MapObjects;
using Microsoft.Xna.Framework;
namespace DangerousD.GameCore.Managers
@ -13,7 +14,7 @@ namespace DangerousD.GameCore.Managers
{
public void UpdateCollisions(List<Entity> entities, List<LivingEntity> livingEntities,
List<MapObject> mapObjects, GameTime gameTime)
List<MapObject> mapObjects, List<Player> players, GameTime gameTime)
{
float delta = (float)gameTime.ElapsedGameTime.TotalSeconds;
foreach (var item in livingEntities)
@ -21,7 +22,8 @@ namespace DangerousD.GameCore.Managers
item.velocity = item.velocity + item.acceleration * delta;
}
CheckCollisionsLE_MO(livingEntities, mapObjects);
CheckCollisionsLE_MO(livingEntities, mapObjects.Where(mo => mo is StopTile).ToList());
CheckCollisionsPlayer_Platform(players, mapObjects.OfType<Platform>().ToList());
CheckCollisionsE_LE(entities, livingEntities);
CheckCollisionsLE_LE(livingEntities);
@ -75,6 +77,7 @@ namespace DangerousD.GameCore.Managers
if (currentEntity is Player)
{
AppManager.Instance.DebugHUD.Set("velocity", currentEntity.velocity.ToString());
AppManager.Instance.DebugHUD.Set("falling", (currentEntity as Player).FallingThroughPlatform.ToString());
AppManager.Instance.DebugHUD.Set("intersects y", "");
}
foreach (var mapObject in mapObjects)
@ -100,17 +103,57 @@ namespace DangerousD.GameCore.Managers
currentEntity.SetPosition(new Vector2(newRect.X, newRect.Y));
}
}
private void CheckCollisionsPlayer_Platform(List<Player> players, List<Platform> platforms)
{
foreach (var player in players)
{
if (player.velocity.Y <= 0 || player.FallingThroughPlatform)
{
continue;
}
var currentRect = player.Rectangle;
var newRect = currentRect;
var collidedY = false;
var tryingRectY = currentRect;
tryingRectY.Offset(0, (int)Math.Ceiling(player.velocity.Y));
AppManager.Instance.DebugHUD.Set("intersects platform", "false");
foreach (var platform in platforms)
{
if (tryingRectY.Intersects(platform.Rectangle))
{
AppManager.Instance.DebugHUD.Set("intersects platform", "true");
collidedY = true;
break;
}
}
if (collidedY)
{
// костыль потому что в CheckCollisionsLE_MO он спускается
newRect.Y -= (int)Math.Ceiling(player.velocity.Y);
player.isOnGround = true;
player.velocity.Y = 0;
}
player.SetPosition(new Vector2(newRect.X, newRect.Y));
}
}
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]);
}
}
}
@ -234,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;

View file

@ -19,7 +19,7 @@ namespace DangerousD.GameCore
public void LoadSounds() // метод для загрузки звуков из папки
{
var k = Directory.GetFiles("../../..//Content").Where(x => x.EndsWith("mp3"));
var k = Directory.GetFiles("../../..//Content//sounds").Where(x => x.EndsWith("mp3"));
if (k.Count() > 0)
{
@ -27,7 +27,7 @@ namespace DangerousD.GameCore
string[] soundFiles = k.Select(x => x.Split("\\").Last().Split("/").Last().Replace(".mp3", "")).ToArray();// папка со звуками там где exe
foreach (var soundFile in soundFiles)
{
Sounds.Add(soundFile, AppManager.Instance.Content.Load<SoundEffect>(soundFile).CreateInstance());
Sounds.Add(soundFile, AppManager.Instance.Content.Load<SoundEffect>("sounds//" + soundFile).CreateInstance());
}
}
@ -40,7 +40,6 @@ namespace DangerousD.GameCore
public void StartAmbientSound(string soundName) // запустить звук у которого нет позиции
{
return;
var sound = new Sound(Sounds[soundName]);
sound.SoundEffect.IsLooped = false;
sound.SoundEffect.Play();
@ -54,7 +53,7 @@ namespace DangerousD.GameCore
{
var sound = new Sound(Sounds[soundName], soundPos);
sound.SoundEffect.IsLooped = false;
sound.SoundEffect.Volume = (float)sound.GetDistance(playerPos) / MaxSoundDistance;
sound.SoundEffect.Volume = (float)(MaxSoundDistance-sound.GetDistance(playerPos)) / MaxSoundDistance;
sound.SoundEffect.Play();
PlayingSounds.Add(sound);
if (AppManager.Instance.multiPlayerStatus == MultiPlayerStatus.Host)
@ -80,7 +79,7 @@ namespace DangerousD.GameCore
for (int i = 0; i < PlayingSounds.Count; i++)
{
if (!PlayingSounds[i].isAmbient)
PlayingSounds[i].SoundEffect.Volume = (float)PlayingSounds[i].GetDistance(player.Pos) / MaxSoundDistance;
PlayingSounds[i].SoundEffect.Volume = (float)(MaxSoundDistance - PlayingSounds[i].GetDistance(player.Pos)) / MaxSoundDistance;
if (PlayingSounds[i].SoundEffect.State == SoundState.Stopped)
PlayingSounds.Remove(PlayingSounds[i]);
}

View file

@ -91,7 +91,7 @@ namespace DangerousD.GameCore.Network
}
catch { }
}
public void SendMsg(List<NetworkTask> networkTask)
public void SendMsg(List<NetworkTask> networkTask, Socket ignoreSocket = null)
{
byte[] Data = Encoding.Unicode.GetBytes(JsonConvert.SerializeObject(networkTask));
int count = Data.Length;
@ -100,11 +100,14 @@ namespace DangerousD.GameCore.Network
try
{
foreach (Socket socket in clientSockets)
{
if (!(socket == ignoreSocket))
{
socket.Send(BitConverter.GetBytes(count));
socket.Send(Data);
}
}
}
catch { }
}
else
@ -148,7 +151,8 @@ namespace DangerousD.GameCore.Network
}
else
{
GetReceivingMessages(JsonConvert.DeserializeObject<List<NetworkTask>>(so.sb.ToString()));
List<NetworkTask> tasks = JsonConvert.DeserializeObject<List<NetworkTask>>(so.sb.ToString());
GetReceivingMessages(tasks);
}
}
catch { }

View file

@ -51,8 +51,10 @@ namespace MonogameLibrary.UI.Base
}
}
}
public void Update()
public GameTime gameTime;
public void Update(GameTime gameTime)
{
this.gameTime = gameTime;
try
{
keyboardState = Keyboard.GetState();

View file

@ -16,7 +16,7 @@ namespace MonogameLibrary.UI.Elements
public delegate void OnButtonPressed();
public event OnButtonPressed? RightButtonPressed;
public event OnButtonPressed? LeftButtonPressed;
protected HoverState hoverState = HoverState.None;
public HoverState hoverState = HoverState.None;
public Button(UIManager manager, int layerIndex = 0) : base(manager, layerIndex)
{
@ -40,7 +40,7 @@ namespace MonogameLibrary.UI.Elements
if (mouseState.LeftButton != prevmouseState.LeftButton)
{
hoverState = HoverState.Pressing;
LeftButtonPressed?.Invoke();
CallLeftBtnEvent();
return true;
}
}
@ -77,5 +77,9 @@ namespace MonogameLibrary.UI.Elements
DrawText(_spriteBatch);
}
public void CallLeftBtnEvent()
{
LeftButtonPressed?.Invoke();
}
}
}

View file

@ -16,22 +16,57 @@ namespace MonogameLibrary.UI.Elements
public ButtonText(UIManager manager, int layerIndex = 0) : base(manager, layerIndex)
{
}
float gameTime = 0;
public override bool InteractUpdate(MouseState mouseState, MouseState prevmouseState)
{
gameTime += (float)Manager.gameTime.ElapsedGameTime.TotalSeconds;
return base.InteractUpdate(mouseState, prevmouseState);
}
public override void Draw(SpriteBatch _spriteBatch)
{
if (hoverState == HoverState.None)
{
fontColor = Color.White;
var d = (float)(((Math.Sin(gameTime * 2 - Math.PI) + 1) / 2f) * 0.1 + 0.7f);
fontColor = Color.FromNonPremultiplied(new Vector4(0.8f,0.15f, 0.15f, 1) * d
);
}
else if (hoverState == HoverState.Hovering)
{
fontColor = new Color(211, 211, 211);
var d2 = (float)(((Math.Sin(gameTime * 2 - Math.PI) + 1) / 2f) * 0.1 + 0.7f);
fontColor = Color.FromNonPremultiplied(new Vector4(0.8f, 0.15f, 0.15f, 1) * d2
);
}
else
{
fontColor = new Color(112, 128, 144);
//fontColor = new Color(112, 128, 144);
fontColor = new Color(212, 228, 244);
}
if (hoverState == HoverState.Hovering)
{
int kk = 50;
scale += 0.005f;
var d = (float)(((Math.Sin(gameTime * 1 - Math.PI) + 1) / 2f) * 0.1 + 1f);
Color oldColor = fontColor;
fontColor = Color.FromNonPremultiplied(new Vector4(252 / 255f, 231 / 255f, 124 / 255f, 1) * d
);
DrawText(_spriteBatch);
fontColor = oldColor;
fontColor.A = 255;
scale -= 0.005f;
scale -= 0.0002f;
}
if (hoverState == HoverState.Pressing)
{
scale -= 0.025f;
DrawText(_spriteBatch);
scale += 0.025f;
}
else
{
DrawText(_spriteBatch);
}
}
}
}

View file

@ -19,8 +19,10 @@ namespace MonogameLibrary.UI.Elements
}
protected HoverState hoverState = HoverState.None;
float gameTime = 0;
public virtual bool InteractUpdate(MouseState mouseState, MouseState prevmouseState)
{
gameTime += (float)Manager.gameTime.ElapsedGameTime.TotalSeconds;
if (rectangle.Intersects(new Rectangle(mouseState.Position, Point.Zero)))
{
if (mouseState.LeftButton == ButtonState.Pressed)

View file

@ -26,9 +26,13 @@ namespace MonogameLibrary.UI.Elements
public event OnTextChange? StopChanging;
public event OnTextChange? OnEnter;
protected HoverState hoverState = HoverState.None;
public HoverState hoverState = HoverState.None;
protected IsSelected isSelected = IsSelected.NotSelected;
public bool shouldEndOnEnter;
public void SelectIt()
{
isSelected = IsSelected.Selected;
}
public virtual bool InteractUpdate(MouseState mouseState, MouseState prevmouseState)
{