diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 0b61b7a..36ce98f 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -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 diff --git a/DangerousD/Content/Door.tsx b/DangerousD/Content/Door.tsx new file mode 100644 index 0000000..a250dd5 --- /dev/null +++ b/DangerousD/Content/Door.tsx @@ -0,0 +1,4 @@ + + + + diff --git a/DangerousD/Content/MonstersAnimations.png b/DangerousD/Content/MonstersAnimations.png index 5bc9cca..97e3e11 100644 Binary files a/DangerousD/Content/MonstersAnimations.png and b/DangerousD/Content/MonstersAnimations.png differ diff --git a/DangerousD/Content/animation1.png b/DangerousD/Content/animation1.png new file mode 100644 index 0000000..bbc2157 Binary files /dev/null and b/DangerousD/Content/animation1.png differ diff --git a/DangerousD/Content/animations/GibsMoveLeftBottom b/DangerousD/Content/animations/GibsMoveLeftBottom new file mode 100644 index 0000000..b0f96f0 --- /dev/null +++ b/DangerousD/Content/animations/GibsMoveLeftBottom @@ -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"} diff --git a/DangerousD/Content/animations/GibsMoveLeftTop b/DangerousD/Content/animations/GibsMoveLeftTop new file mode 100644 index 0000000..e80c714 --- /dev/null +++ b/DangerousD/Content/animations/GibsMoveLeftTop @@ -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"} diff --git a/DangerousD/Content/animations/GibsMoveRightBottom b/DangerousD/Content/animations/GibsMoveRightBottom new file mode 100644 index 0000000..246ab34 --- /dev/null +++ b/DangerousD/Content/animations/GibsMoveRightBottom @@ -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"} diff --git a/DangerousD/Content/animations/GibsMoveRightTop b/DangerousD/Content/animations/GibsMoveRightTop new file mode 100644 index 0000000..4b193fd --- /dev/null +++ b/DangerousD/Content/animations/GibsMoveRightTop @@ -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"} diff --git a/DangerousD/Content/animations/GibsNotMove b/DangerousD/Content/animations/GibsNotMove new file mode 100644 index 0000000..e5333b8 --- /dev/null +++ b/DangerousD/Content/animations/GibsNotMove @@ -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"} diff --git a/DangerousD/Content/animations/HunchmanAttackLeft b/DangerousD/Content/animations/HunchmanAttackLeft index f6b0634..a84b54b 100644 --- a/DangerousD/Content/animations/HunchmanAttackLeft +++ b/DangerousD/Content/animations/HunchmanAttackLeft @@ -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"} diff --git a/DangerousD/Content/animations/HunchmanAttackRight b/DangerousD/Content/animations/HunchmanAttackRight index 482d7f3..b4e8552 100644 --- a/DangerousD/Content/animations/HunchmanAttackRight +++ b/DangerousD/Content/animations/HunchmanAttackRight @@ -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"} diff --git a/DangerousD/Content/animations/HunchmanMoveRight b/DangerousD/Content/animations/HunchmanMoveRight index a289fa5..2719ebe 100644 --- a/DangerousD/Content/animations/HunchmanMoveRight +++ b/DangerousD/Content/animations/HunchmanMoveRight @@ -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"} diff --git a/DangerousD/Content/animations/playerReload b/DangerousD/Content/animations/playerReload new file mode 100644 index 0000000..2dd0586 --- /dev/null +++ b/DangerousD/Content/animations/playerReload @@ -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"} diff --git a/DangerousD/Content/animations/playerShootLeft b/DangerousD/Content/animations/playerShootLeft new file mode 100644 index 0000000..e710737 --- /dev/null +++ b/DangerousD/Content/animations/playerShootLeft @@ -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" +} diff --git a/DangerousD/Content/animations/playerShootRight b/DangerousD/Content/animations/playerShootRight new file mode 100644 index 0000000..3b7ef81 --- /dev/null +++ b/DangerousD/Content/animations/playerShootRight @@ -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" +} diff --git a/DangerousD/Content/boss.tmx b/DangerousD/Content/boss.tmx new file mode 100644 index 0000000..97ea7e8 --- /dev/null +++ b/DangerousD/Content/boss.tmx @@ -0,0 +1,162 @@ + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +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 + + +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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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,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 + + + + + + + + + + + + + + diff --git a/DangerousD/Content/debug.tmx b/DangerousD/Content/debug.tmx new file mode 100644 index 0000000..f52dbe7 --- /dev/null +++ b/DangerousD/Content/debug.tmx @@ -0,0 +1,373 @@ + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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 + + +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,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 + + +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570, +570,570,570,570,570,570,570,570,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 + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,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,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,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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,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 + + +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 + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DangerousD/Content/doors.png b/DangerousD/Content/doors.png new file mode 100644 index 0000000..60742ae Binary files /dev/null and b/DangerousD/Content/doors.png differ diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx index 271b1e5..df88666 100644 --- a/DangerousD/Content/lvl.tmx +++ b/DangerousD/Content/lvl.tmx @@ -1,7 +1,13 @@ - - - + + + + + + + + + 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 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 -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,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0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,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 @@ - + 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 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 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29, @@ -629,13 +505,13 @@ 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 @@ 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 -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 -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 - + @@ -752,8 +628,20 @@ - + + + + + + + + + + + + + diff --git a/DangerousD/Content/map.tmx b/DangerousD/Content/map.tmx new file mode 100644 index 0000000..9afca4d --- /dev/null +++ b/DangerousD/Content/map.tmx @@ -0,0 +1,75 @@ + + + + + + +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 + + +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DangerousD/Content/DoomTestSong.mp3 b/DangerousD/Content/sounds/DoomTestSong.mp3 similarity index 100% rename from DangerousD/Content/DoomTestSong.mp3 rename to DangerousD/Content/sounds/DoomTestSong.mp3 diff --git a/DangerousD/Content/sounds/shotgun_shot.mp3 b/DangerousD/Content/sounds/shotgun_shot.mp3 new file mode 100644 index 0000000..56a4a56 Binary files /dev/null and b/DangerousD/Content/sounds/shotgun_shot.mp3 differ diff --git a/DangerousD/Content/tiles.BMP b/DangerousD/Content/tiles.BMP new file mode 100644 index 0000000..a9709a0 Binary files /dev/null and b/DangerousD/Content/tiles.BMP differ diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs index 7f7b212..ee65365 100644 --- a/DangerousD/GameCore/GUI/AbstractGui.cs +++ b/DangerousD/GameCore/GUI/AbstractGui.cs @@ -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 Elements = new(); + private List 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(); + 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; + } } \ No newline at end of file diff --git a/DangerousD/GameCore/GUI/DebugHUD.cs b/DangerousD/GameCore/GUI/DebugHUD.cs index b56d90a..c4e3e55 100644 --- a/DangerousD/GameCore/GUI/DebugHUD.cs +++ b/DangerousD/GameCore/GUI/DebugHUD.cs @@ -11,6 +11,7 @@ namespace DangerousD.GameCore.GUI { private SpriteFont _spriteFont; private Dictionary _text = new(); + private List _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); + } + } } } \ No newline at end of file diff --git a/DangerousD/GameCore/GUI/HUD.cs b/DangerousD/GameCore/GUI/HUD.cs index a9507de..10a7fc0 100644 --- a/DangerousD/GameCore/GUI/HUD.cs +++ b/DangerousD/GameCore/GUI/HUD.cs @@ -13,8 +13,7 @@ using static System.Net.Mime.MediaTypeNames; 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; @@ -22,14 +21,22 @@ namespace DangerousD.GameCore.GUI SpriteFont spriteFont; public void Draw(SpriteBatch spriteBatch) - { + { spriteBatch.Begin(); 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++) { - spriteBatch.Draw(texture, new Rectangle(wigth / 30 + i * 13, height / 17 + 4, 5, 20), Color.Yellow); + 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(); } diff --git a/DangerousD/GameCore/GUI/LoginGUI.cs b/DangerousD/GameCore/GUI/LoginGUI.cs index de0a68c..5b7f972 100644 --- a/DangerousD/GameCore/GUI/LoginGUI.cs +++ b/DangerousD/GameCore/GUI/LoginGUI.cs @@ -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) { diff --git a/DangerousD/GameCore/GUI/MenuGUI.cs b/DangerousD/GameCore/GUI/MenuGUI.cs index 5f23b10..214e747 100644 --- a/DangerousD/GameCore/GUI/MenuGUI.cs +++ b/DangerousD/GameCore/GUI/MenuGUI.cs @@ -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