diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb index 82b499e..05bebc6 100644 --- a/DangerousD/Content/Content.mgcb +++ b/DangerousD/Content/Content.mgcb @@ -26,7 +26,6 @@ /processorParam:TextureFormat=Color /build:animation1.png - #begin ButtonFont.spritefont /importer:FontDescriptionImporter /processor:FontDescriptionProcessor @@ -55,6 +54,17 @@ /processorParam:TextureFormat=Compressed /build:Font2.spritefont +#begin menuFon.jpg +/importer:TextureImporter +/processor:TextureProcessor +/processorParam:ColorKeyColor=255,0,255,255 +/processorParam:ColorKeyEnabled=True +/processorParam:GenerateMipmaps=False +/processorParam:PremultiplyAlpha=True +/processorParam:ResizeToPowerOfTwo=False +/processorParam:MakeSquare=False +/processorParam:TextureFormat=Color +/build:menuFon.jpg #begin MonstersAnimations.png /importer:TextureImporter @@ -68,18 +78,6 @@ /processorParam:TextureFormat=Color /build:MonstersAnimations.png -#begin menuFon.jpg -/importer:TextureImporter -/processor:TextureProcessor -/processorParam:ColorKeyColor=255,0,255,255 -/processorParam:ColorKeyEnabled=True -/processorParam:GenerateMipmaps=False -/processorParam:PremultiplyAlpha=True -/processorParam:ResizeToPowerOfTwo=False -/processorParam:MakeSquare=False -/processorParam:TextureFormat=Color -/build:menuFon.jpg - #begin PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png /importer:TextureImporter /processor:TextureProcessor @@ -92,10 +90,17 @@ /processorParam:TextureFormat=Color /build:PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png -#begin sus.tmx -/importer:TiledMapImporter -/processor:TiledMapProcessor -/build:sus.tmx +#begin tiles.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:tiles.png #begin wall.jpg /importer:TextureImporter diff --git a/DangerousD/Content/level1.tmx b/DangerousD/Content/level1.tmx new file mode 100644 index 0000000..0febad6 --- /dev/null +++ b/DangerousD/Content/level1.tmx @@ -0,0 +1,611 @@ + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,75,52,52,52,52, +0,0,0,0,0,0,0,0,0,0,0,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,52, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,74,75,0,0,0,0 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,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,52,52,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, +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,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,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +52,52,52,0,52,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 + + +52,52,52,52,52,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, +52,52,52,52,52,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, +52,52,52,52,52,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 + + +52,52,52,52,52,52,52,52,52,0,0,0,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,52,52,52,52,52,52,0,0,0,52,52,52,52, +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,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 + + + + + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,144,144,144,144,144,144,144,144,247,144, +0,0,0,0,0,0,157,157,167,157,157,157,157,157,260,157, +0,0,0,0,0,0,157,157,180,157,254,255,157,157,260,157, +0,0,0,0,0,0,157,157,193,157,267,268,157,157,260,157, +0,0,0,0,0,0,204,204,204,204,280,281,204,272,260,272, +0,0,0,0,0,0,147,199,148,0,0,0,0,0,260,0, +0,0,0,0,0,0,147,199,148,144,144,144,144,144,260,144, +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,204,272,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,0,0,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,144,144,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,157, +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,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,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,157,157,157,271, +204,204,204,204,204,204,204,278,279,204,204,204,204,204,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,157,157,157, +157,157,272,204,204,204,284,204,204,204,278,279,204,204,204,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, +157,157,157,157,254,255,157,157,157,157,157,180,157,157,222,223 + + +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,243,157,157,157,157,157,157,157,157,157,157,157, +157,157,157,157,256,257,157,157,157,157,157,157,157,157,157,157, +157,157,157,157,269,270,157,157,157,157,157,261,262,263,264,157, +204,204,204,204,282,283,204,204,204,204,204,274,275,276,277,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,209,210,211,212,157,157,157,167,157,157,157,157, +157,254,255,157,222,223,224,225,157,157,157,180,157,157,157,157, +157,267,268,157,235,236,237,238,157,157,157,193,157,157,157,157, +204,280,281,204,204,204,204,204,204,204,204,204,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, +211,212,157,157,157,157,157,157,157,157,157,157,157,157,157,157, +224,225,157,157,252,253,157,157,157,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,157,157,157,157,157,272,157,647,648,157,272,157,0,0,0, +157,157,157,157,157,157,145,147,199,200,148,145,157,0,0,0, +204,204,204,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, +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 + + +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,19,20,21,22,0,0,0,0,0,0,0,0,0, +0,30,31,32,33,34,35,0,0,0,0,0,0,0,0,0, +0,43,44,45,46,47,48,0,0,0,0,0,0,0,0,0, +64,65,18,58,59,60,18,0,0,0,0,0,0,0,0,0, +77,78,18,71,72,73,18,0,0,68,56,56,55,56,56,69, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +0,0,0,0,0,0,147,199,148,157,157,157,157,157,260,157, +0,0,0,0,0,0,160,200,161,204,204,272,157,157,260,157, +0,0,0,0,0,0,0,0,0,0,0,0,157,157,260,157, +0,0,0,0,0,0,144,144,144,144,144,144,157,157,260,157, +0,0,0,0,0,0,157,167,157,157,157,157,157,157,260,157, +0,0,0,0,0,0,157,180,157,252,253,157,157,157,260,157, +0,0,0,0,0,0,157,193,157,265,266,157,157,157,260,157, +0,0,0,0,0,0,204,204,204,278,279,204,272,157,260,157, +0,0,0,0,0,0,0,0,0,0,0,0,0,157,260,157, +0,0,0,0,0,0,144,144,144,144,144,144,144,157,260,157, +0,0,0,0,0,0,157,157,157,157,157,157,157,219,220,221, +0,0,0,12,0,0,157,157,157,254,255,157,157,232,233,234, +0,0,0,0,26,63,157,157,157,267,268,218,213,214,215,216, +0,0,0,38,39,63,204,204,204,280,281,231,226,227,228,229, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + +157,157,157,157,267,268,157,157,157,157,157,193,157,157,235,236, +157,272,204,204,280,281,204,204,204,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, +157,157,157,191,192,157,157,157,157,157,157,157,157,157,157,157, +157,157,157,157,157,157,157,157,157,157,261,262,263,264,157,157, +272,204,204,204,204,204,204,204,204,204,274,275,276,277,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,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, +0,0,0,0,0,0,0,0,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,157,157,157,157,271,157,157,157,157, +204,204,204,204,278,279,204,204,204,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, +157,157,254,255,157,157,157,157,157,256,257,157,222,223,224,225, +157,157,267,268,157,157,157,157,157,269,270,157,235,236,237,238, +204,204,280,281,204,204,204,204,204,282,283,204,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,178,179,157,157,157,157,157,157,157,157,157,157,157,157, +157,157,191,192,157,157,157,157,258,157,157,157,157,157,157,157, +157,157,157,157,157,157,157,157,271,157,157,157,157,157,157,157, +204,204,204,204,204,204,204,204,284,204,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 + + +267,268,157,147,199,148,157,269,270,157,265,266,157,0,0,0, +280,281,204,160,200,161,204,282,283,204,278,279,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,157,157,157,157,157,157,0,0,0, +157,157,157,147,199,148,157,157,157,157,252,253,157,0,0,0, +157,157,157,147,199,148,157,157,157,157,265,266,157,0,0,0, +204,204,204,160,200,161,204,204,204,204,278,279,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,199,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, +0,0,0,0,0,0,0,0,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/lvl1.tmx b/DangerousD/Content/lvl1.tmx deleted file mode 100644 index 6909dd5..0000000 --- a/DangerousD/Content/lvl1.tmx +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - eJxjYBgFo2AUDFVgxkgZBgB40ANx - - - eJzzY2RgMKMAj4JRMAqGLgAAvZMDiQ== - - - - diff --git a/DangerousD/Content/tiles.BMP b/DangerousD/Content/tiles.BMP deleted file mode 100644 index a9709a0..0000000 Binary files a/DangerousD/Content/tiles.BMP and /dev/null differ diff --git a/DangerousD/Content/tiles.png b/DangerousD/Content/tiles.png new file mode 100644 index 0000000..3e35587 Binary files /dev/null and b/DangerousD/Content/tiles.png differ diff --git a/DangerousD/DangerousD.csproj b/DangerousD/DangerousD.csproj index 725d7c1..99e6800 100644 --- a/DangerousD/DangerousD.csproj +++ b/DangerousD/DangerousD.csproj @@ -19,9 +19,6 @@ - - - diff --git a/DangerousD/GameCore/GameObjects/MapObject.cs b/DangerousD/GameCore/GameObjects/MapObject.cs index c12598b..e2a94a3 100644 --- a/DangerousD/GameCore/GameObjects/MapObject.cs +++ b/DangerousD/GameCore/GameObjects/MapObject.cs @@ -3,15 +3,13 @@ using Microsoft.Xna.Framework; using System.Security.Cryptography.X509Certificates; using DangerousD.GameCore.Graphics; using Microsoft.Xna.Framework.Graphics; -using MonoGame.Extended.Sprites; - namespace DangerousD.GameCore.GameObjects; public abstract class MapObject : GameObject { public bool IsColliderOn; private Rectangle _sourceRectangle; - protected override GraphicsComponent GraphicsComponent { get; } = new("map"); + protected override GraphicsComponent GraphicsComponent { get; } = new("tiles"); public MapObject(Vector2 position, Rectangle sourceRectangle) : base(position) { _sourceRectangle = sourceRectangle; diff --git a/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs b/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs index 999a009..abf76bf 100644 --- a/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs +++ b/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs @@ -9,6 +9,4 @@ public class Platform : MapObject { IsColliderOn = true; } - - protected override GraphicsComponent GraphicsComponent { get; } } \ No newline at end of file diff --git a/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs b/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs index e73eaaf..4a5dafd 100644 --- a/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs +++ b/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs @@ -9,6 +9,4 @@ public class StopTile : MapObject { IsColliderOn = true; } - - protected override GraphicsComponent GraphicsComponent { get; } } \ No newline at end of file diff --git a/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs b/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs index 5776344..72b7581 100644 --- a/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs +++ b/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs @@ -9,6 +9,4 @@ public class Tile : MapObject { IsColliderOn = false; } - - protected override GraphicsComponent GraphicsComponent { get; } } \ No newline at end of file diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs index 2891dbf..bc69f2d 100644 --- a/DangerousD/GameCore/Managers/AppManager.cs +++ b/DangerousD/GameCore/Managers/AppManager.cs @@ -24,18 +24,18 @@ namespace DangerousD.GameCore IDrawableObject LoginGUI; IDrawableObject LobbyGUI; - public GameManager GameManager { get; private set; } = new GameManager(); + public GameManager GameManager { get; private set; } = new(); public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder(); public NetworkManager NetworkManager { get; private set; } = new NetworkManager(); public AppManager() { + Content.RootDirectory = "Content"; Instance = this; _graphics = new GraphicsDeviceManager(this); - Content.RootDirectory = "Content"; IsMouseVisible = true; + resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight); TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 30); - resolution = new Point(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight); gameState = GameState.Menu; MenuGUI = new MenuGUI(); LoginGUI = new LoginGUI(); @@ -44,6 +44,7 @@ namespace DangerousD.GameCore protected override void Initialize() { + GameManager.Initialize(); AnimationBuilder.LoadAnimations(); MenuGUI.Initialize(); LoginGUI.Initialize(); @@ -134,7 +135,7 @@ namespace DangerousD.GameCore case GameState.Lobby: break; case GameState.Game: - GameManager.mapManager.LoadLevel(""); + GameManager.mapManager.LoadLevel("Level1"); break; default: throw new ArgumentOutOfRangeException(); diff --git a/DangerousD/GameCore/Managers/GameManager.cs b/DangerousD/GameCore/Managers/GameManager.cs index a6840d6..c7d0c91 100644 --- a/DangerousD/GameCore/Managers/GameManager.cs +++ b/DangerousD/GameCore/Managers/GameManager.cs @@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics; using System; using System.Collections.Generic; using System.Text; +using DangerousD.GameCore.GameObjects.LivingEntities.Monsters; namespace DangerousD.GameCore { @@ -30,6 +31,15 @@ namespace DangerousD.GameCore physicsManager = new PhysicsManager(); } + public void Initialize() + { + //mapManager.LoadLevel("Level1"); + } + + public void LoadContent() + { + } + internal void Register(GameObject gameObject) { if (gameObject is LivingEntity) diff --git a/DangerousD/GameCore/Managers/MapManager.cs b/DangerousD/GameCore/Managers/MapManager.cs index c566cf9..e36089b 100644 --- a/DangerousD/GameCore/Managers/MapManager.cs +++ b/DangerousD/GameCore/Managers/MapManager.cs @@ -8,11 +8,15 @@ namespace DangerousD.GameCore.Managers { public class MapManager { + private int _columns; + //Level public void LoadLevel(string level) { + LoadTilesData(); + XmlDocument xml = new(); - xml.Load($"{level}.tmx"); + xml.Load($"../../../Content/{level}.tmx"); Vector2 tileSize = new(int.Parse(xml.DocumentElement.Attributes["tilewidth"].Value), int.Parse(xml.DocumentElement.Attributes["tileheight"].Value)); @@ -28,19 +32,21 @@ namespace DangerousD.GameCore.Managers { string tileType = layer.Attributes["class"].Value; - foreach (XmlNode chunk in layer.ChildNodes) + foreach (XmlNode chunk in layer.SelectNodes("//chunk")) { - Vector2 chunkSize = new(int.Parse(chunk.Attributes["width"].Value), - int.Parse(chunk.Attributes["height"].Value)); - Vector2 chunkPos = new(int.Parse(chunk.Attributes["x"].Value), int.Parse(chunk.Attributes["y"].Value)); + int chunkW = int.Parse(chunk.Attributes["width"].Value); + int chunkX = int.Parse(chunk.Attributes["x"].Value); + int chunkY = int.Parse(chunk.Attributes["y"].Value); - List tiles = chunk.Value.Split(',').Select(int.Parse).ToList(); + List tiles = chunk.InnerText.Split(',').Select(int.Parse).ToList(); for (int i = 0; i < tiles.Count; i++) { - Vector2 pos = new((chunkPos.Y + i % chunkSize.X) * tileSize.Y, - (chunkPos.Y + i / chunkSize.X) * tileSize.Y); - Rectangle sourceRect = new(pos.ToPoint(), tileSize.ToPoint()); + if (tiles[i] == 0) continue; + + Vector2 pos = new((chunkX + i % chunkW) * tileSize.X, + (chunkY + i / chunkW) * tileSize.Y); + Rectangle sourceRect = new(new Point(tiles[i] % _columns, tiles[i] / _columns), tileSize.ToPoint()); switch (tileType) { @@ -56,5 +62,14 @@ namespace DangerousD.GameCore.Managers }} } } + + private void LoadTilesData() + { + XmlDocument xml = new(); + xml.Load($"../../../Content/map.tsx"); + XmlNode root = xml.DocumentElement; + + _columns = int.Parse(root.Attributes["columns"].Value); + } } }