Merge branch 'Development' into GraphicsComponent-refactor
This commit is contained in:
commit
600411cd55
44 changed files with 2332 additions and 438 deletions
20
.run/ZoFo.run.xml
Normal file
20
.run/ZoFo.run.xml
Normal file
|
@ -0,0 +1,20 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="ZoFo" type="DotNetProject" factoryName=".NET Project">
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/ZoFo/bin/Debug/net8.0/ZoFo" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/ZoFo/bin/Debug/net8.0" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="USE_MONO" value="0" />
|
||||
<option name="RUNTIME_ARGUMENTS" value="" />
|
||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/ZoFo/ZoFo.csproj" />
|
||||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||
<option name="PROJECT_TFM" value="net8.0" />
|
||||
<method v="2">
|
||||
<option name="Build" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
|
@ -355,6 +355,174 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/switch.png
|
||||
|
||||
#begin Textures/icons/12.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:Textures/icons/12.png
|
||||
|
||||
#begin Textures/icons/13.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:Textures/icons/13.png
|
||||
|
||||
#begin Textures/icons/14.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:Textures/icons/14.png
|
||||
|
||||
#begin Textures/icons/21.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:Textures/icons/21.png
|
||||
|
||||
#begin Textures/icons/22.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:Textures/icons/22.png
|
||||
|
||||
#begin Textures/icons/5.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:Textures/icons/5.png
|
||||
|
||||
#begin Textures/icons/6.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:Textures/icons/6.png
|
||||
|
||||
#begin Textures/icons/7.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:Textures/icons/7.png
|
||||
|
||||
#begin Textures/icons/8.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:Textures/icons/8.png
|
||||
|
||||
#begin Textures/icons/9.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:Textures/icons/9.png
|
||||
|
||||
#begin Textures/TileSetImages/Tilelist1.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:Textures/TileSetImages/Tilelist1.png
|
||||
|
||||
#begin Textures/TileSetImages/Tilelist2.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:Textures/TileSetImages/Tilelist2.png
|
||||
|
||||
#begin Textures/TileSetImages/Tilelist3.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:Textures/TileSetImages/Tilelist3.png
|
||||
|
||||
#begin Textures/TileSetImages/Tilelist4.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:Textures/TileSetImages/Tilelist4.png
|
||||
|
||||
#begin Textures/TileSetImages/TilesetFloor.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
|
@ -3,24 +3,28 @@
|
|||
"height": 4300,
|
||||
"width": 2
|
||||
},
|
||||
"activeFile": "TileSets/TileSet 1.tsj",
|
||||
"activeFile": "TileMaps/main.tmj",
|
||||
"expandedProjectPaths": [
|
||||
".",
|
||||
"TileMaps",
|
||||
"TileSets"
|
||||
"TileSets",
|
||||
"TileMaps"
|
||||
],
|
||||
"fileStates": {
|
||||
"TileMaps/TileSets/TileSet 1.tsj": {
|
||||
"scaleInDock": 1
|
||||
},
|
||||
"TileMaps/main.tmj": {
|
||||
"scale": 0.25,
|
||||
"scale": 0.75,
|
||||
"selectedLayer": 0,
|
||||
"viewCenter": {
|
||||
"x": 3078,
|
||||
"y": 2164
|
||||
"x": 578,
|
||||
"y": 482.66666666666674
|
||||
}
|
||||
},
|
||||
"TileSets/CollisionTileSet.tsj": {
|
||||
"scaleInDock": 0.75,
|
||||
"scaleInEditor": 1
|
||||
},
|
||||
"TileSets/TileSet 1.tsj": {
|
||||
"scaleInDock": 1,
|
||||
"scaleInEditor": 1.5
|
||||
|
@ -33,14 +37,15 @@
|
|||
"last.imagePath": "D:/C#/Я смотрел ваши ХАКАТОНЫ/ZoFo/ZoFo/Content/Textures/TileSetImages",
|
||||
"openFiles": [
|
||||
"TileSets/TileSet 1.tsj",
|
||||
"TileSets/WallSet.tsj",
|
||||
"TileMaps/main.tmj"
|
||||
"TileMaps/main.tmj",
|
||||
"TileSets/CollisionTileSet.tsj"
|
||||
],
|
||||
"project": "MapSession.tiled-project",
|
||||
"recentFiles": [
|
||||
"TileSets/WallSet.tsj",
|
||||
"TileMaps/main.tmj",
|
||||
"TileSets/TileSet 1.tsj"
|
||||
"TileSets/TileSet 1.tsj",
|
||||
"TileSets/CollisionTileSet.tsj",
|
||||
"TileSets/WallSet.tsj"
|
||||
],
|
||||
"tileset.lastUsedFormat": "json",
|
||||
"tileset.margin": 2,
|
||||
|
|
|
@ -5,44 +5,44 @@
|
|||
{
|
||||
"chunks":[
|
||||
{
|
||||
"data":[24, 50, 51, 24, 24, 24, 28, 29, 24, 24, 28, 46, 29, 24, 24, 50,
|
||||
24, 28, 46, 46, 29, 24, 50, 51, 24, 90, 25, 111, 23, 28, 29, 89,
|
||||
29, 50, 2, 2, 51, 24, 24, 28, 29, 28, 10, 3, 23, 25, 23, 89,
|
||||
23, 90, 24, 24, 24, 24, 24, 25, 23, 50, 32, 10, 32, 47, 23, 89,
|
||||
51, 24, 24, 24, 28, 29, 24, 50, 51, 24, 50, 51, 50, 2, 51, 24,
|
||||
28, 46, 29, 24, 50, 51, 24, 24, 24, 24, 28, 46, 46, 46, 29, 89,
|
||||
50, 2, 51, 24, 24, 24, 24, 28, 29, 24, 50, 2, 2, 2, 51, 89,
|
||||
24, 24, 28, 29, 24, 89, 24, 50, 32, 29, 24, 90, 24, 24, 24, 24,
|
||||
24, 89, 25, 23, 24, 90, 24, 24, 50, 51, 24, 24, 24, 24, 24, 24,
|
||||
89, 24, 25, 23, 24, 24, 24, 24, 24, 24, 24, 24, 28, 46, 29, 24,
|
||||
24, 24, 25, 23, 24, 28, 46, 29, 24, 89, 28, 29, 25, 111, 45, 29,
|
||||
24, 24, 50, 51, 89, 50, 3, 45, 29, 24, 50, 51, 50, 2, 3, 45,
|
||||
24, 90, 24, 24, 24, 24, 50, 2, 32, 29, 24, 24, 24, 24, 25, 1,
|
||||
24, 89, 24, 24, 24, 24, 89, 24, 50, 51, 24, 24, 24, 24, 50, 32,
|
||||
29, 90, 90, 24, 24, 89, 24, 24, 24, 24, 24, 24, 28, 29, 24, 50,
|
||||
32, 29, 24, 24, 90, 24, 24, 24, 24, 24, 24, 24, 25, 45, 29, 24],
|
||||
"data":[28, 46, 29, 24, 24, 28, 46, 29, 24, 90, 24, 24, 50, 51, 24, 24,
|
||||
50, 2, 32, 46, 29, 50, 2, 32, 29, 24, 90, 24, 89, 24, 24, 24,
|
||||
89, 28, 10, 3, 23, 24, 24, 25, 23, 24, 24, 24, 28, 29, 89, 24,
|
||||
24, 25, 23, 50, 32, 29, 24, 25, 23, 28, 29, 24, 50, 51, 28, 29,
|
||||
24, 25, 23, 24, 50, 51, 24, 50, 51, 50, 51, 24, 24, 24, 50, 32,
|
||||
24, 25, 23, 24, 24, 89, 24, 24, 24, 24, 24, 24, 24, 24, 28, 47,
|
||||
24, 50, 32, 46, 29, 90, 24, 579, 29, 24, 89, 89, 24, 24, 25, 579,
|
||||
29, 24, 25, 114, 45, 29, 24, 25, 23, 90, 24, 24, 24, 89, 50, 51,
|
||||
51, 89, 50, 3, 115, 23, 24, 25, 23, 89, 28, 29, 24, 24, 24, 89,
|
||||
24, 24, 24, 25, 111, 23, 90, 50, 51, 24, 50, 32, 46, 29, 24, 24,
|
||||
24, 90, 24, 50, 2, 51, 28, 46, 46, 29, 24, 50, 2, 51, 24, 24,
|
||||
24, 89, 24, 24, 28, 29, 50, 2, 2, 51, 24, 90, 24, 24, 89, 24,
|
||||
46, 29, 28, 46, 10, 32, 29, 24, 24, 24, 24, 24, 24, 24, 24, 24,
|
||||
2, 51, 50, 2, 51, 50, 51, 24, 89, 24, 24, 90, 24, 24, 89, 90,
|
||||
24, 28, 46, 29, 24, 24, 24, 24, 89, 24, 24, 24, 24, 24, 89, 24,
|
||||
29, 50, 3, 23, 24, 90, 28, 29, 24, 24, 24, 24, 24, 90, 28, 46],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[51, 28, 46, 29, 24, 24, 24, 24, 24, 50, 2, 51, 24, 24, 24, 24,
|
||||
24, 50, 2, 51, 28, 29, 24, 24, 24, 28, 29, 89, 24, 28, 46, 29,
|
||||
89, 24, 90, 24, 50, 32, 29, 24, 28, 10, 51, 24, 24, 25, 1, 51,
|
||||
90, 24, 24, 24, 28, 10, 51, 90, 25, 45, 46, 29, 24, 25, 23, 89,
|
||||
24, 28, 29, 28, 10, 32, 29, 28, 10, 2, 2, 51, 24, 50, 51, 24,
|
||||
24, 50, 32, 10, 51, 50, 51, 25, 45, 46, 29, 24, 24, 90, 24, 24,
|
||||
24, 24, 50, 32, 46, 29, 24, 50, 2, 2, 32, 29, 24, 24, 24, 24,
|
||||
24, 24, 24, 50, 2, 32, 29, 24, 24, 24, 50, 51, 24, 24, 24, 24,
|
||||
24, 24, 24, 24, 24, 25, 23, 90, 24, 89, 24, 28, 29, 24, 24, 28,
|
||||
28, 46, 29, 24, 24, 50, 51, 24, 24, 24, 24, 50, 32, 29, 24, 25,
|
||||
50, 2, 51, 28, 29, 28, 46, 29, 24, 24, 89, 24, 25, 45, 46, 10,
|
||||
29, 24, 24, 50, 32, 10, 2, 51, 24, 24, 24, 24, 50, 2, 2, 51,
|
||||
51, 24, 28, 29, 50, 51, 28, 46, 29, 24, 24, 24, 24, 24, 90, 28,
|
||||
29, 24, 25, 23, 24, 24, 50, 2, 32, 29, 24, 24, 89, 24, 89, 50,
|
||||
51, 24, 50, 51, 24, 24, 24, 24, 50, 32, 29, 89, 90, 24, 24, 24,
|
||||
24, 24, 24, 24, 24, 28, 29, 24, 24, 25, 23, 24, 24, 28, 46, 29],
|
||||
"data":[90, 24, 24, 24, 24, 24, 24, 24, 24, 90, 24, 89, 24, 24, 24, 24,
|
||||
28, 29, 24, 24, 24, 24, 24, 24, 90, 24, 89, 24, 24, 24, 24, 24,
|
||||
50, 51, 24, 24, 89, 24, 24, 24, 24, 24, 24, 24, 24, 28, 29, 24,
|
||||
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 23, 28,
|
||||
46, 29, 24, 24, 24, 24, 24, 28, 29, 24, 24, 24, 90, 50, 32, 47,
|
||||
115, 23, 24, 24, 24, 24, 24, 25, 23, 28, 29, 24, 24, 89, 50, 3,
|
||||
3, 45, 46, 29, 24, 24, 24, 50, 51, 50, 51, 89, 24, 24, 28, 47,
|
||||
50, 2, 2, 32, 29, 24, 24, 24, 90, 24, 24, 24, 24, 24, 25, 1,
|
||||
24, 24, 24, 25, 23, 24, 24, 24, 89, 24, 24, 90, 24, 24, 50, 51,
|
||||
89, 24, 24, 25, 23, 24, 24, 24, 24, 24, 28, 29, 24, 24, 24, 90,
|
||||
24, 24, 24, 50, 32, 29, 24, 24, 28, 46, 47, 23, 24, 24, 24, 24,
|
||||
24, 24, 24, 90, 50, 51, 90, 24, 50, 3, 1, 51, 28, 29, 28, 46,
|
||||
24, 89, 28, 46, 46, 29, 24, 24, 24, 50, 51, 28, 10, 51, 50, 2,
|
||||
24, 90, 25, 1, 2, 51, 28, 46, 46, 46, 46, 10, 51, 24, 24, 24,
|
||||
24, 24, 50, 32, 29, 28, 10, 2, 2, 3, 1, 32, 29, 24, 24, 24,
|
||||
29, 24, 24, 25, 45, 47, 23, 24, 24, 50, 51, 25, 45, 29, 24, 24],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
|
@ -52,19 +52,19 @@
|
|||
"data":[24, 24, 50, 51, 24, 50, 2, 51, 24, 28, 47, 1, 51, 25, 111, 45,
|
||||
24, 24, 28, 29, 24, 24, 24, 28, 29, 25, 111, 23, 24, 50, 2, 2,
|
||||
28, 46, 10, 51, 28, 29, 24, 25, 23, 50, 2, 51, 24, 24, 28, 29,
|
||||
50, 2, 51, 90, 50, 32, 29, 50, 32, 46, 29, 24, 24, 24, 25, 23,
|
||||
89, 24, 24, 24, 90, 50, 51, 24, 25, 114, 23, 24, 90, 24, 25, 23,
|
||||
24, 28, 29, 24, 24, 28, 29, 89, 50, 2, 51, 24, 24, 24, 25, 23,
|
||||
24, 50, 51, 28, 46, 10, 51, 24, 24, 24, 90, 24, 24, 24, 50, 32,
|
||||
24, 24, 90, 50, 2, 32, 29, 28, 46, 29, 28, 46, 29, 24, 90, 50,
|
||||
46, 29, 24, 90, 24, 25, 45, 47, 1, 51, 50, 2, 32, 46, 29, 89,
|
||||
115, 45, 29, 24, 24, 50, 2, 2, 32, 29, 24, 24, 50, 3, 23, 24,
|
||||
2, 2, 51, 24, 24, 24, 24, 24, 50, 32, 46, 29, 24, 50, 51, 24,
|
||||
89, 24, 28, 29, 89, 24, 24, 24, 24, 25, 111, 23, 24, 28, 29, 24,
|
||||
46, 29, 25, 23, 89, 28, 46, 29, 24, 25, 115, 23, 24, 25, 23, 24,
|
||||
2, 32, 47, 45, 46, 10, 2, 32, 46, 10, 2, 51, 24, 25, 23, 89,
|
||||
10, 2, 51, 90, 50, 32, 29, 50, 32, 46, 29, 24, 24, 24, 25, 23,
|
||||
23, 24, 24, 24, 90, 50, 51, 24, 25, 114, 23, 24, 90, 24, 25, 23,
|
||||
23, 28, 29, 24, 24, 28, 29, 89, 50, 2, 51, 24, 24, 24, 25, 23,
|
||||
23, 50, 51, 28, 46, 10, 51, 24, 24, 24, 90, 24, 24, 24, 50, 32,
|
||||
51, 24, 90, 50, 2, 32, 29, 28, 46, 29, 28, 46, 29, 24, 90, 50,
|
||||
28, 29, 24, 90, 24, 25, 45, 47, 1, 51, 50, 2, 32, 46, 29, 89,
|
||||
25, 45, 29, 24, 24, 50, 2, 2, 32, 29, 24, 24, 50, 3, 23, 24,
|
||||
50, 2, 51, 24, 24, 24, 24, 24, 50, 32, 46, 29, 24, 50, 51, 24,
|
||||
29, 24, 28, 29, 89, 24, 24, 24, 24, 25, 111, 23, 24, 28, 29, 24,
|
||||
32, 29, 25, 23, 89, 28, 46, 29, 24, 25, 115, 23, 24, 25, 23, 24,
|
||||
50, 32, 47, 45, 46, 10, 2, 32, 46, 10, 2, 51, 24, 25, 23, 89,
|
||||
24, 50, 2, 3, 1, 32, 46, 10, 2, 51, 89, 24, 89, 50, 51, 24,
|
||||
90, 28, 46, 47, 23, 50, 3, 23, 24, 24, 90, 24, 28, 46, 46, 29],
|
||||
24, 28, 46, 47, 23, 50, 3, 23, 24, 24, 90, 24, 28, 46, 46, 29],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
|
@ -181,7 +181,7 @@
|
|||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[50, 51, 24, 24, 24, 24, 28, 46, 29, 24, 89, 28, 10, 2, 51, 28,
|
||||
"data":[51, 24, 50, 51, 24, 24, 25, 45, 29, 24, 24, 28, 29, 24, 50, 3,
|
||||
24, 24, 28, 29, 28, 29, 25, 111, 23, 90, 24, 25, 23, 24, 24, 25,
|
||||
46, 46, 10, 51, 25, 23, 25, 115, 23, 90, 89, 50, 51, 24, 28, 47,
|
||||
2, 2, 51, 24, 25, 23, 25, 111, 23, 24, 24, 24, 24, 24, 50, 2,
|
||||
|
@ -203,7 +203,7 @@
|
|||
"y":16
|
||||
},
|
||||
{
|
||||
"data":[29, 24, 24, 24, 24, 50, 51, 24, 24, 25, 45, 29, 24, 50, 2, 32,
|
||||
"data":[23, 24, 24, 50, 2, 2, 51, 89, 24, 28, 46, 10, 2, 51, 24, 28,
|
||||
23, 24, 28, 46, 46, 46, 46, 29, 28, 47, 1, 51, 90, 24, 24, 50,
|
||||
23, 89, 50, 2, 3, 115, 1, 51, 50, 2, 51, 89, 24, 24, 24, 28,
|
||||
51, 28, 29, 24, 50, 2, 51, 24, 28, 29, 90, 24, 28, 29, 28, 47,
|
||||
|
@ -1087,137 +1087,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, 578, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 583, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 583, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 582, 582, 582, 582, 582, 582, 582, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
582, 582, 582, 582, 582, 582, 582, 0, 0, 0, 583, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 585, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":48,
|
||||
"y":32
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 580, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":16,
|
||||
"y":48
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":32,
|
||||
"y":48
|
||||
},
|
||||
{
|
||||
"data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 585, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
581, 581, 581, 581, 581, 581, 581, 0, 0, 0, 585, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"height":16,
|
||||
"width":16,
|
||||
"x":48,
|
||||
"y":48
|
||||
"x":0,
|
||||
"y":16
|
||||
}],
|
||||
"height":48,
|
||||
"height":64,
|
||||
"id":2,
|
||||
"name":"Collidable ",
|
||||
"opacity":1,
|
||||
"startx":16,
|
||||
"starty":16,
|
||||
"startx":0,
|
||||
"starty":0,
|
||||
"type":"tilelayer",
|
||||
"visible":true,
|
||||
"width":80,
|
||||
"width":64,
|
||||
"x":0,
|
||||
"y":0
|
||||
}],
|
||||
|
|
|
@ -9,16 +9,31 @@
|
|||
"tiledversion":"1.10.2",
|
||||
"tileheight":128,
|
||||
"tiles":[
|
||||
{
|
||||
"id":0,
|
||||
"type":"Tiles"
|
||||
},
|
||||
{
|
||||
"id":1,
|
||||
"type":"Tiles"
|
||||
},
|
||||
{
|
||||
"id":2,
|
||||
"type":"Tiles"
|
||||
},
|
||||
{
|
||||
"id":3,
|
||||
"type":"Tiles"
|
||||
},
|
||||
{
|
||||
"id":4,
|
||||
"type":"Tile"
|
||||
"type":"Tiles"
|
||||
},
|
||||
{
|
||||
"id":5,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -48,14 +63,14 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":6,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":4,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -74,14 +89,51 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":7,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
"height":128,
|
||||
"id":1,
|
||||
"name":"",
|
||||
"rotation":0,
|
||||
"type":"",
|
||||
"visible":true,
|
||||
"width":36,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
{
|
||||
"height":36.6666666666667,
|
||||
"id":2,
|
||||
"name":"",
|
||||
"rotation":0,
|
||||
"type":"",
|
||||
"visible":true,
|
||||
"width":128.666666666667,
|
||||
"x":0,
|
||||
"y":91.3333333333333
|
||||
}],
|
||||
"opacity":1,
|
||||
"type":"objectgroup",
|
||||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":8,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -100,14 +152,14 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":9,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -126,14 +178,14 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":10,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -163,14 +215,14 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":11,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -189,14 +241,14 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":12,
|
||||
"objectgroup":
|
||||
{
|
||||
"draworder":"index",
|
||||
"id":2,
|
||||
"name":"",
|
||||
"objects":[
|
||||
{
|
||||
|
@ -226,7 +278,156 @@
|
|||
"visible":true,
|
||||
"x":0,
|
||||
"y":0
|
||||
}
|
||||
},
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":13,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":14,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":15,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":16,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":17,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":18,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":19,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":20,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":21,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":22,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":23,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":24,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":25,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":26,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":27,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":28,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":29,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":30,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":31,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":32,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":33,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":34,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":35,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":36,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":37,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":38,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":39,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":40,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":41,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":42,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":43,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":44,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":45,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":46,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":47,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":48,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":49,
|
||||
"type":"StopObject"
|
||||
}],
|
||||
"tilewidth":128,
|
||||
"type":"tileset",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
|||
{"id":"player_idle_rotate_weapon","textureName":"Textures/AnimationTextures/Character/hr-level1_idle","startSpriteRectangle":{"X":0,"Y":116,"Width":92,"Height":116},"frameSecond":[{"Item1":0,"Item2":5}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -13,11 +13,16 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
using System.Drawing;
|
||||
using System.Reflection;
|
||||
using ZoFo.GameCore.GameObjects.Entities;
|
||||
using System.Net.Sockets;
|
||||
using System.Net;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer;
|
||||
using ZoFo.GameCore.GameObjects.Entities.LivingEntities.Player;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using ZoFo.GameCore.GUI;
|
||||
|
||||
using ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
||||
using ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
||||
namespace ZoFo.GameCore
|
||||
{
|
||||
public class Client
|
||||
|
@ -27,10 +32,19 @@ namespace ZoFo.GameCore
|
|||
ClientNetworkManager networkManager;
|
||||
|
||||
public bool IsConnected { get { return networkManager.IsConnected; } }
|
||||
public IPEndPoint InfoConnect => networkManager.InfoConnect;
|
||||
|
||||
public Client()
|
||||
{
|
||||
networkManager = new ClientNetworkManager();
|
||||
networkManager.GetDataSent += OnDataSend;
|
||||
|
||||
// Подписка на действия инпутменеджера.
|
||||
// Отправляются данные апдейтса с обновлением инпута
|
||||
AppManager.Instance.InputManager.ActionEvent += () => networkManager.AddData(new UpdateInput(){
|
||||
InputMovementDirection = AppManager.Instance.InputManager.InputMovementDirection,
|
||||
InputAttackDirection = AppManager.Instance.InputManager.InputAttackDirection
|
||||
});
|
||||
}
|
||||
|
||||
public void OnDataSend(string data)
|
||||
|
@ -55,6 +69,7 @@ namespace ZoFo.GameCore
|
|||
|
||||
List<MapObject> mapObjects = new List<MapObject>();
|
||||
List<GameObject> gameObjects = new List<GameObject>();
|
||||
List<StopObject> stopObjects = new List<StopObject>();
|
||||
/// <summary>
|
||||
/// Клиент должен обнговлять игру анимаций
|
||||
/// </summary>
|
||||
|
@ -72,6 +87,10 @@ namespace ZoFo.GameCore
|
|||
{
|
||||
mapObjects[i].Draw(spriteBatch);
|
||||
}
|
||||
for (int i = 0; i < stopObjects.Count; i++)
|
||||
{
|
||||
stopObjects[i].Draw(spriteBatch);
|
||||
}
|
||||
for (int i = 0; i < gameObjects.Count; i++)
|
||||
{
|
||||
gameObjects[i].Draw(spriteBatch);
|
||||
|
@ -90,12 +109,25 @@ namespace ZoFo.GameCore
|
|||
(update as UpdateTileCreated).tileSetName
|
||||
));
|
||||
}
|
||||
else if (update is UpdateStopObjectCreated)
|
||||
{
|
||||
stopObjects.Add(
|
||||
new StopObject(
|
||||
(update as UpdateStopObjectCreated).Position,
|
||||
(update as UpdateStopObjectCreated).Size.ToVector2(),
|
||||
(update as UpdateStopObjectCreated).sourceRectangle,
|
||||
(update as UpdateStopObjectCreated).tileSetName,
|
||||
(update as UpdateStopObjectCreated).collisions
|
||||
));
|
||||
}
|
||||
else if (update is UpdateGameObjectCreated)
|
||||
{
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "EntittyForAnimationTests")
|
||||
gameObjects.Add(new EntittyForAnimationTests((update as UpdateGameObjectCreated).position));
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Player")
|
||||
gameObjects.Add(new Player((update as UpdateGameObjectCreated).position));
|
||||
if ((update as UpdateGameObjectCreated).GameObjectType == "Ammo")
|
||||
gameObjects.Add(new Ammo((update as UpdateGameObjectCreated).position));
|
||||
|
||||
(gameObjects.Last() as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||
//var a = Assembly.GetAssembly(typeof(GameObject));
|
||||
|
|
|
@ -26,25 +26,27 @@ public class SelectingServerGUI : AbstractGUI
|
|||
Elements.Add(menuBackground);
|
||||
menuBackground.LoadTexture(AppManager.Instance.Content);
|
||||
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle(width / 2 - (int)(width / 8), height / 7, (int)(width / 4), (int)(height / 20)), text = "Select server", fontColor = Color.White, mainColor = Color.Transparent, scale = 0.9f, fontName = "Fonts/Font"});
|
||||
Elements.Add(new Label(Manager) { rectangle = new Rectangle(width / 2 - (int)(width / 8), height / 7, (int)(width / 4), (int)(height / 20)), text = "Select server", fontColor = Color.White, mainColor = Color.Transparent, scale = 0.9f, fontName = "Fonts/Font" });
|
||||
|
||||
TextBox ipBox = new TextBox(Manager)
|
||||
{
|
||||
rectangle = new Rectangle(width / 4 - (width / 4) / 2, height / 4, (int)(width / 4), (int)(height / 20)),
|
||||
text = "ip",
|
||||
scale = 0.2f,
|
||||
scale = 0.5f,
|
||||
fontColor = Color.White,
|
||||
mainColor = Color.Gray,
|
||||
textAligment = MonogameLibrary.UI.Enums.TextAligment.Left,
|
||||
fontName = "Fonts/Font"
|
||||
fontName = "Fonts/Font3"
|
||||
};
|
||||
ipBox.TextChanged += input => {
|
||||
ipBox.TextChanged += input =>
|
||||
{
|
||||
if (input == "ip")
|
||||
{
|
||||
ipBox.text = ""; ipBox.fontColor = Color.White;
|
||||
}
|
||||
};
|
||||
ipBox.StopChanging += input => {
|
||||
ipBox.StopChanging += input =>
|
||||
{
|
||||
if (input.Length == 0)
|
||||
{
|
||||
ipBox.fontColor = Color.White;
|
||||
|
@ -68,12 +70,21 @@ public class SelectingServerGUI : AbstractGUI
|
|||
Client client = new Client();
|
||||
var endpoint = ipBox.text.Split(':');
|
||||
int port;
|
||||
try
|
||||
{
|
||||
if (int.TryParse(endpoint[1], out port))
|
||||
{
|
||||
client.JoinRoom(endpoint[0], port);
|
||||
AppManager.Instance.SetClient(client);
|
||||
AppManager.Instance.SetGUI(new WaitingForPlayersGUI(false));
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
// throw;
|
||||
}
|
||||
|
||||
// ваш код здесь
|
||||
};
|
||||
Elements.Add(joinButton);
|
||||
|
@ -91,8 +102,11 @@ public class SelectingServerGUI : AbstractGUI
|
|||
|
||||
// host
|
||||
Server server = new Server(); //Server Logic MultiPlayer
|
||||
server.CreateRoom(5);
|
||||
Client client = new Client();
|
||||
server.CreateRoom(2);
|
||||
client.JoinYourself(server.MyIp.Port);
|
||||
AppManager.Instance.SetServer(server);
|
||||
AppManager.Instance.SetClient(client);
|
||||
string key = server.MyIp.ToString();
|
||||
AppManager.Instance.debugHud.Set(key, "MultiPlayer");
|
||||
// ваш код здесь
|
||||
|
@ -101,7 +115,7 @@ public class SelectingServerGUI : AbstractGUI
|
|||
Elements.Add(hostButton);
|
||||
|
||||
Button bTExit = new Button(Manager)
|
||||
{ fontName = "Fonts/Font3", scale = 0.4f, text = "<-", fontColor = Color.Black, mainColor = Color.Transparent, rectangle = new Rectangle(width / 30, height / 30, width / 40, width / 40), textureName = "Textures/GUI/checkboxs_off"};
|
||||
{ fontName = "Fonts/Font3", scale = 0.4f, text = "<-", fontColor = Color.Black, mainColor = Color.Transparent, rectangle = new Rectangle(width / 30, height / 30, width / 40, width / 40), textureName = "Textures/GUI/checkboxs_off" };
|
||||
Elements.Add(bTExit);
|
||||
bTExit.LeftButtonPressed += () =>
|
||||
{
|
||||
|
|
|
@ -31,11 +31,15 @@ public class WaitingForPlayersGUI : AbstractGUI
|
|||
menuBackground = new DrawableUIElement(Manager) { rectangle = new Rectangle(0, 0, width, height), mainColor = Color.White, textureName = "Textures/GUI/background/Waiting" };
|
||||
Elements.Add(menuBackground);
|
||||
menuBackground.LoadTexture(AppManager.Instance.Content);
|
||||
// string pcIp =
|
||||
|
||||
// string pcIp =
|
||||
ip = new Label(Manager) { rectangle = new Rectangle(width / 2 - (int)(width / 8), height / 7, (int)(width / 4), (int)(height / 20)), text = AppManager.Instance.server.MyIp.ToString(), fontColor = Color.White, mainColor = Color.Transparent, scale = 0.9f, fontName = "Fonts/Font3" };
|
||||
Elements.Add(ip);
|
||||
if (isHost)
|
||||
{
|
||||
ip = new Label(Manager) { rectangle = new Rectangle(width / 2 - (int)(width / 8), height / 7, (int)(width / 4), (int)(height / 20)), text = AppManager.Instance.server.MyIp.ToString(), fontColor = Color.White, mainColor = Color.Transparent, scale = 0.9f, fontName = "Fonts\\Font3" };
|
||||
Elements.Add(ip);
|
||||
Button startButton = new Button(Manager)
|
||||
{
|
||||
rectangle = new Rectangle(width / 2 - (width / 15) / 2, height / 2 + height / 4, (int)(width / 15), (int)(height / 20)),
|
||||
|
@ -48,11 +52,31 @@ public class WaitingForPlayersGUI : AbstractGUI
|
|||
startButton.LeftButtonPressed += () =>
|
||||
{
|
||||
// start
|
||||
|
||||
AppManager.Instance.ChangeState(GameState.HostPlaying);
|
||||
// ваш код здесь
|
||||
};
|
||||
Elements.Add(startButton);
|
||||
}
|
||||
else {
|
||||
ip = new Label(Manager) { rectangle = new Rectangle(width / 2 - (int)(width / 8), height / 7, (int)(width / 4), (int)(height / 20)), text = AppManager.Instance.client.InfoConnect.ToString(), fontColor = Color.White, mainColor = Color.Transparent, scale = 0.9f, fontName = "Fonts\\Font3" };
|
||||
Elements.Add(ip);
|
||||
Button waitButton = new Button(Manager)
|
||||
{
|
||||
rectangle = new Rectangle(width / 2 - (width / 15) / 2, height / 2 + height / 4, (int)(width / 15), (int)(height / 20)),
|
||||
text = "WAITING",
|
||||
scale = 0.3f,
|
||||
fontColor = Color.White,
|
||||
mainColor = Color.Gray,
|
||||
fontName = "Fonts/Font"
|
||||
};
|
||||
waitButton.LeftButtonPressed += () =>
|
||||
{
|
||||
// start
|
||||
AppManager.Instance.ChangeState(GameState.ClientPlaying);
|
||||
// ваш код здесь
|
||||
};
|
||||
Elements.Add(waitButton);
|
||||
}
|
||||
|
||||
Button bTExit = new Button(Manager)
|
||||
{ fontName = "Fonts/Font3", scale = 0.4f, text = "<-", fontColor = Color.Black, mainColor = Color.Transparent, rectangle = new Rectangle(width / 30, height / 30, width / 40, width / 40), textureName = "Textures/GUI/checkboxs_off"};
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace ZoFo.GameCore.GameManagers
|
|||
Keyboard.GetState().IsKeyDown(Keys.Escape)) { server.CloseConnection(); Exit(); }
|
||||
|
||||
|
||||
debugHud.Set("key", "value");
|
||||
// debugHud.Set("key", "value");
|
||||
|
||||
InputManager.Update();
|
||||
currentGUI.Update(gameTime);
|
||||
|
@ -107,7 +107,7 @@ namespace ZoFo.GameCore.GameManagers
|
|||
client.Update(gameTime);
|
||||
break;
|
||||
case GameState.ClientPlaying:
|
||||
server.Update(gameTime);
|
||||
client.Update(gameTime);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
|
|||
{
|
||||
this.gameObject = gameObject;
|
||||
|
||||
hasCollision = hasCollision;
|
||||
this.hasCollision = hasCollision;
|
||||
this.isTrigger = isTrigger;
|
||||
if (hasCollision)
|
||||
this.stopRectangle = collisionRectangle.Value;
|
||||
|
|
|
@ -44,9 +44,12 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
|
|||
|
||||
foreach (var item in ObjectsWithCollisions)//фильтрация
|
||||
{
|
||||
if (Math.Abs(item.stopRectangle.X - entity.collisionComponent.stopRectangle.X) < 550
|
||||
&& Math.Abs(item.stopRectangle.Y - entity.collisionComponent.stopRectangle.Y) < 550
|
||||
&& tryingRectX.Intersects(item.stopRectangle))
|
||||
if (item == componentOfEntity) continue;
|
||||
|
||||
Rectangle rectChecking = item.stopRectangle.SetOrigin(item.gameObject.position);
|
||||
if (Math.Abs(item.gameObject.position.X - componentOfEntity.gameObject.position.X) < 550
|
||||
&& Math.Abs(item.gameObject.position.Y - componentOfEntity.gameObject.position.Y) < 550
|
||||
&& tryingRectX.Intersects(rectChecking))
|
||||
|
||||
{
|
||||
collidedX = true;// меняем значение соприкосновения на true
|
||||
|
@ -75,9 +78,11 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
|
|||
|
||||
foreach (var item in ObjectsWithCollisions)//фильтрация
|
||||
{
|
||||
if (Math.Abs(item.stopRectangle.X - entity.collisionComponent.stopRectangle.X) < 550
|
||||
&& Math.Abs(item.stopRectangle.Y - entity.collisionComponent.stopRectangle.Y) < 550
|
||||
&& tryingRectY.Intersects(item.stopRectangle))
|
||||
if (item == componentOfEntity) continue;
|
||||
Rectangle rectChecking = item.stopRectangle.SetOrigin(item.gameObject.position);
|
||||
if (Math.Abs(item.gameObject.position.X - componentOfEntity.gameObject.position.X) < 550
|
||||
&& Math.Abs(item.gameObject.position.Y - componentOfEntity.gameObject.position.Y) < 550
|
||||
&& tryingRectY.Intersects(rectChecking))
|
||||
|
||||
{
|
||||
collidedY = true;// меняем значение соприкосновения на true
|
||||
|
@ -93,7 +98,7 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
|
|||
}
|
||||
else
|
||||
{
|
||||
entity.position.X += entity.velocity.Y;
|
||||
entity.position.Y += entity.velocity.Y;
|
||||
newRect.Y = tryingRectY.Y;//значение по X для нового РЕК приравниваем к значению испытуемого РЕК
|
||||
}
|
||||
|
||||
|
@ -135,4 +140,14 @@ namespace ZoFo.GameCore.GameManagers.CollisionManager
|
|||
|
||||
|
||||
}
|
||||
public static class ExtentionClass
|
||||
{
|
||||
public static Rectangle SetOrigin(this Rectangle rectangle, Vector2 origin)
|
||||
{
|
||||
rectangle.X = (int)origin.X;
|
||||
rectangle.Y = (int)origin.Y;
|
||||
return rectangle;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,17 +17,21 @@ namespace ZoFo.GameCore.GameManagers
|
|||
|
||||
public class InputManager
|
||||
{
|
||||
public delegate void Delegat();
|
||||
public event Delegat ShootEvent; // событие удара(когда нажат X, событие срабатывает)
|
||||
public event Action ShootEvent; // событие удара(когда нажат X, событие срабатывает)
|
||||
|
||||
public event Delegat OnInteract; // событие взаимодействия с collectable(например, лутом)
|
||||
public event Action OnInteract; // событие взаимодействия с collectable(например, лутом)
|
||||
//с помощью кнопки E.
|
||||
|
||||
public event Action ActionEvent;
|
||||
public Vector2 InputMovementDirection;
|
||||
private Vector2 prevInputMovementDirection;
|
||||
public Vector2 InputAttackDirection;
|
||||
private Vector2 prevInputAttackDirection;
|
||||
|
||||
public event Delegat TalkEvent;
|
||||
public event Action TalkEvent;
|
||||
|
||||
ScopeState currentScopeState; // Положение оружия. Left, Right, Straight, Back, StraightLeft, StraightRight, BackLeft, BackRight.
|
||||
public ScopeState currentScopeState; // Положение оружия. Left, Right, Straight, Back, StraightLeft, StraightRight, BackLeft, BackRight.
|
||||
private ScopeState prevCurrentScopeState;
|
||||
private bool _cheatsEnabled = false;
|
||||
public bool InvincibilityCheat { get; private set; } = false;
|
||||
public bool CollisionsCheat { get; private set; } = false;
|
||||
|
@ -128,6 +132,7 @@ namespace ZoFo.GameCore.GameManagers
|
|||
lastGamePadState = gamePadState;
|
||||
#endregion
|
||||
#region Работа с KeyBoard
|
||||
|
||||
#region InputAttack with mouse
|
||||
MouseState mouseState = Mouse.GetState();
|
||||
AppManager.Instance.debugHud.Set("mouse position", $"({mouseState.X}, {mouseState.Y}");
|
||||
|
@ -231,6 +236,17 @@ namespace ZoFo.GameCore.GameManagers
|
|||
lastKeyboardState = keyBoardState;
|
||||
|
||||
#endregion
|
||||
#region ActionEvent
|
||||
if(InputMovementDirection != prevInputMovementDirection ||
|
||||
InputAttackDirection != prevInputAttackDirection ||
|
||||
currentScopeState != prevCurrentScopeState)
|
||||
{
|
||||
ActionEvent?.Invoke();
|
||||
}
|
||||
prevInputMovementDirection = InputMovementDirection;
|
||||
prevInputAttackDirection = InputAttackDirection;
|
||||
prevCurrentScopeState = currentScopeState;
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ namespace ZoFo.GameCore.GameManagers.ItemManager
|
|||
}
|
||||
void Initialize()
|
||||
{
|
||||
tagItemPairs.Add("wood", new ItemInfo("wood","wood",false,null));
|
||||
tagItemPairs.Add("rock", new ItemInfo("rock", "rock", false, null));
|
||||
tagItemPairs.Add("steel", new ItemInfo("steel", "steel", false, null));
|
||||
tagItemPairs.Add("Wood", new ItemInfo("Wood","Wood",false,null));
|
||||
tagItemPairs.Add("Peeble", new ItemInfo("Peeble", "Peeble", false, null));
|
||||
tagItemPairs.Add("Steel", new ItemInfo("Steel", "Steel", false, null));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
|||
{
|
||||
public class Object
|
||||
{
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public double Height { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
|
|||
{
|
||||
public int Id { get; set; }
|
||||
public string Type { get; set; }
|
||||
public List<ObjectGroup> Objectgroup { get; set; }
|
||||
public ObjectGroup Objectgroup { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
{
|
||||
public class MapManager
|
||||
{
|
||||
|
||||
private static readonly string _templatePath = "Content/MapData/TileMaps/{0}.tmj";
|
||||
|
||||
//private static readonly float _scale = 1.0f;
|
||||
private List<TileSet> _tileSets = new List<TileSet>();
|
||||
|
||||
|
@ -32,7 +32,8 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
{
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
TileMap tileMap = JsonSerializer.Deserialize<TileMap>(File.ReadAllText(string.Format(_templatePath, mapName)), options);
|
||||
TileMap tileMap =
|
||||
JsonSerializer.Deserialize<TileMap>(File.ReadAllText(string.Format(_templatePath, mapName)), options);
|
||||
|
||||
// Загрузка TileSet-ов по TileSetInfo
|
||||
List<TileSet> tileSets = new List<TileSet>();
|
||||
|
@ -42,6 +43,7 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
tileSet.FirstGid = tileSetInfo.FirstGid;
|
||||
tileSets.Add(tileSet);
|
||||
}
|
||||
tileSets.Reverse();
|
||||
|
||||
foreach (var layer in tileMap.Layers)
|
||||
{
|
||||
|
@ -51,37 +53,45 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
{
|
||||
foreach (var tileSet in tileSets)
|
||||
{
|
||||
if (tileSet.FirstGid - chunk.Data[i] <= 0)
|
||||
if (tileSet.FirstGid <= chunk.Data[i])
|
||||
{
|
||||
int number = chunk.Data[i] - tileSet.FirstGid;
|
||||
|
||||
int relativeColumn = number % tileSet.Columns;
|
||||
int relativeRow = number / tileSet.Columns; // относительно левого угла чанка
|
||||
|
||||
Rectangle sourceRectangle = new Rectangle(relativeColumn * tileSet.TileWidth, relativeRow * tileSet.TileHeight,
|
||||
Rectangle sourceRectangle = new Rectangle(relativeColumn * tileSet.TileWidth,
|
||||
relativeRow * tileSet.TileHeight,
|
||||
tileSet.TileWidth, tileSet.TileHeight);
|
||||
|
||||
Vector2 position = new Vector2((i % chunk.Width) * tileSet.TileWidth + chunk.X * tileSet.TileWidth,
|
||||
Vector2 position = new Vector2(
|
||||
(i % chunk.Width) * tileSet.TileWidth + chunk.X * tileSet.TileWidth,
|
||||
(i / chunk.Height) * tileSet.TileHeight + chunk.Y * tileSet.TileHeight);
|
||||
|
||||
Tile tile = tileSet.Tiles[i]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile
|
||||
Tile tile = tileSet.Tiles[number]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile
|
||||
|
||||
switch (tile.Type)
|
||||
{
|
||||
case "Tile":
|
||||
AppManager.Instance.server.RegisterGameObject(new MapObject(position, new Vector2(tileSet.TileWidth, tileSet.TileHeight),
|
||||
sourceRectangle, "Textures/TileSetImages/" + Path.GetFileName(tileSet.Image).Replace(".png", "")));
|
||||
AppManager.Instance.server.RegisterGameObject(new MapObject(position,
|
||||
new Vector2(tileSet.TileWidth, tileSet.TileHeight),
|
||||
sourceRectangle,
|
||||
"Textures/TileSetImages/" +
|
||||
Path.GetFileName(tileSet.Image).Replace(".png", "")));
|
||||
break;
|
||||
case "StopObject":
|
||||
var collisionRectangles = LoadRectangles(tile); // Грузит коллизии обьектов
|
||||
AppManager.Instance.server.RegisterGameObject(new StopObject(position, new Vector2(tileSet.TileWidth, tileSet.TileHeight),
|
||||
sourceRectangle, "Textures/TileSetImages/" + Path.GetFileName(tileSet.Image).Replace(".png", ""), collisionRectangles.ToArray()));
|
||||
// TODO: изменить конструктор, засунув коллизии.
|
||||
AppManager.Instance.server.RegisterGameObject(new StopObject(position/4,//TODO
|
||||
new Vector2(tileSet.TileWidth, tileSet.TileHeight),
|
||||
sourceRectangle,
|
||||
"Textures/TileSetImages/" +
|
||||
Path.GetFileName(tileSet.Image).Replace(".png", ""),
|
||||
collisionRectangles.ToArray()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,15 +122,19 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
/// </summary>
|
||||
/// <param name="tile"></param>
|
||||
/// <returns></returns>
|
||||
private List<Rectangle> LoadRectangles(Tile tile) {
|
||||
private List<Rectangle> LoadRectangles(Tile tile)
|
||||
{
|
||||
if (tile.Objectgroup == null)
|
||||
{
|
||||
return new List<Rectangle>();
|
||||
}
|
||||
|
||||
List<Rectangle> collisionRectangles = new List<Rectangle>();
|
||||
foreach (var objectGroup in tile.Objectgroup)
|
||||
foreach (var obj in tile.Objectgroup.Objects)
|
||||
{
|
||||
foreach (var obj in objectGroup.Objects)
|
||||
{
|
||||
collisionRectangles.Add(new Rectangle(obj.X, obj.Y, obj.Width, obj.Height));
|
||||
}
|
||||
collisionRectangles.Add(new Rectangle((int)obj.X, (int)obj.Y, (int)obj.Width, (int)obj.Height));
|
||||
}
|
||||
|
||||
return collisionRectangles;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
/// </summary>
|
||||
public void JoinYourself(int port) // single player
|
||||
{
|
||||
endPoint = new IPEndPoint(GetIp(), port);
|
||||
endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
|
||||
socket.Connect(endPoint);
|
||||
SendData();
|
||||
Thread listen = new Thread(StartListening);
|
||||
|
@ -108,7 +108,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
while(socket.Connected)
|
||||
{
|
||||
byte[] bytes = new byte[2048];
|
||||
var countAnsw = socket.Receive(bytes);
|
||||
var countAnsw = socket.Receive(bytes); //Вылетает если кто то закрыл
|
||||
string update = Encoding.UTF8.GetString(bytes, 0, countAnsw); // обновление отосланные сервером
|
||||
GetDataSent(update);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
/// </summary>
|
||||
private void Init()
|
||||
{
|
||||
ip = GetIp();
|
||||
endPoint = new IPEndPoint(ip, port);
|
||||
endPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), port);
|
||||
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
managerThread = new Dictionary<Socket, Thread>();
|
||||
clients = new List<Socket>();
|
||||
|
@ -54,7 +53,8 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
public static IPAddress GetIp()
|
||||
{
|
||||
string hostName = Dns.GetHostName(); // Retrive the Name of HOST
|
||||
string myIP = Dns.GetHostByName(hostName).AddressList[1].ToString();// Get the IP
|
||||
var ipList = Dns.GetHostByName(hostName).AddressList;
|
||||
string myIP = ipList[ipList.Count()-1].ToString();// Get the IP
|
||||
return IPAddress.Parse(myIP);
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
}
|
||||
updates.Clear();
|
||||
return; //TODO TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK TODO REMOVE TO ADD NETWORK
|
||||
|
||||
//Что это?
|
||||
//по 10 паков за раз TODO FIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXITFIXIT
|
||||
List<UpdateData> datasToSend = new List<UpdateData>();
|
||||
for (int i = 0; i < 5 && i<updates.Count; i++)
|
||||
|
@ -142,13 +142,16 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager
|
|||
for (int i = 0; i < playNumber; i++)
|
||||
{
|
||||
Socket client = socket.Accept();
|
||||
AppManager.Instance.debugHud.Log($"Connect {client.LocalEndPoint.ToString()}");
|
||||
Thread thread = new Thread(StartListening);
|
||||
thread.IsBackground = true;
|
||||
thread.Start(client);
|
||||
managerThread.Add(client, thread);
|
||||
clients.Add(client); //добавляем клиентов в лист
|
||||
clients.Add(client);
|
||||
//AppManager.Instance.ChangeState(GameState.HostPlaying);
|
||||
//добавляем клиентов в лист
|
||||
}
|
||||
|
||||
AppManager.Instance.ChangeState(GameState.HostPlaying);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -9,9 +11,12 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer
|
|||
public class UpdateInput :UpdateData
|
||||
{
|
||||
// public int IdEntity { get; set; }
|
||||
public Vector2 InputMovementDirection{get;set;}
|
||||
public Vector2 InputAttackDirection {get;set;}
|
||||
public UpdateInput()
|
||||
{
|
||||
UpdateType = "UpdateInput";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
/// </summary>
|
||||
public class UpdateInteraction : UpdateData
|
||||
{
|
||||
public UpdateInteraction() { UpdateType = "UpdateInteraction"; }
|
||||
public UpdateInteraction(int id)
|
||||
{
|
||||
IdEntity = id;
|
||||
|
|
|
@ -9,6 +9,6 @@ public class UpdateInteractionReady(int idEntity, bool isReady)
|
|||
: UpdateData
|
||||
{
|
||||
public int IdEntity { get; set; } = idEntity;
|
||||
public string UpdateType { get; set; }
|
||||
public string UpdateType { get; set; } = "UpdateInteractionReady";
|
||||
public bool IsReady { get; set; } = isReady;
|
||||
}
|
|
@ -11,6 +11,12 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
|||
/// </summary>
|
||||
public class UpdateLoot : UpdateData
|
||||
{
|
||||
public string lootName;
|
||||
public UpdateLoot() { UpdateType = "UpdateLoot"; }
|
||||
public UpdateLoot(string lootName)
|
||||
{
|
||||
UpdateType = "UpdateLoot";
|
||||
this.lootName = lootName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,4 +23,17 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient
|
|||
public Rectangle sourceRectangle { get; set; }
|
||||
public string tileSetName { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// При создании тайла TODO move to another file
|
||||
/// </summary>
|
||||
public class UpdateStopObjectCreated : UpdateData
|
||||
{
|
||||
public UpdateStopObjectCreated() { UpdateType = "UpdateStopObjectCreated"; }
|
||||
public Texture2D TextureTile { get; set; }
|
||||
public Vector2 Position { get; set; }
|
||||
public Point Size { get; set; }
|
||||
public Rectangle sourceRectangle { get; set; }
|
||||
public string tileSetName { get; set; }
|
||||
public Rectangle[] collisions { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace ZoFo.GameCore.GameObjects.Entities
|
|||
{
|
||||
|
||||
//public override GraphicsComponent graphicsComponent { get; } = new GraphicsComponent(new List<string> { "тут пишите название анимации" }, "сдублируйте " +
|
||||
public override GraphicsComponent graphicsComponent { get; } = new AnimatedGraphicsComponent(new List<string> { "player_running_top_rotate" }, "player_running_top_rotate");
|
||||
public override GraphicsComponent graphicsComponent { get; } = new AnimatedGraphicsComponent(new List<string> { "player_idle_rotate_weapon" }, "player_idle_rotate_weapon");
|
||||
public EntittyForAnimationTests(Vector2 position) : base(position)
|
||||
{
|
||||
graphicsComponent.ObjectDrawRectangle = new Rectangle(0,0,16*12, 16 * 16);
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
class Ammo:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("Textures/icons/8");
|
||||
public Ammo(Vector2 position) : base(position)
|
||||
{
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("Ammo"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
class Antiradine:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("Antiradine");
|
||||
public Antiradine(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("Antiradine"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
using Microsoft.Xna.Framework;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
public class BottleOfWater : Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("BottleOfWater");
|
||||
public BottleOfWater(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("BottleOfWater"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
public class Peeble:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("Peeble");
|
||||
|
||||
public Peeble(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("Peeble"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
class PureBottleOfWater:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("PureBottleOfWater");
|
||||
|
||||
public PureBottleOfWater(Vector2 position) : base(position)
|
||||
{
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("PureBottleOfWater"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
class RottenFlesh:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("RottenFlesh");
|
||||
public RottenFlesh(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("RottenFlesh"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
{
|
||||
class Steel:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("Steel");
|
||||
|
||||
public Steel(Vector2 position) : base(position)
|
||||
{
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("Steel"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +1,23 @@
|
|||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
||||
|
||||
public class Wood : Collectable
|
||||
{
|
||||
public override AnimatedGraphicsComponent graphicsComponent { get; } = new("Wood");
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("Wood");
|
||||
|
||||
public Wood(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
}
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
{
|
||||
AppManager.Instance.server.AddData(new UpdateLoot("Wood"));
|
||||
AppManager.Instance.server.DeleteObject(this);
|
||||
}
|
||||
}
|
|
@ -9,11 +9,11 @@ public class Door : Interactable
|
|||
{
|
||||
public bool isOpened;
|
||||
|
||||
public override AnimatedGraphicsComponent graphicsComponent { get; } = new("DoorClosed");
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new("DoorInteraction");
|
||||
|
||||
public Door(Vector2 position) : base(position)
|
||||
{
|
||||
//graphicsComponent.OnAnimationEnd += _ => { isOpened = !isOpened; };
|
||||
//graphicsComponent.OnAnimationEnd += _ => { isOpened = !isOpened; };//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - SD
|
||||
}
|
||||
|
||||
public override void OnInteraction(object sender, CollisionComponent e)
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables;
|
|||
|
||||
public class Interactable : Entity
|
||||
{
|
||||
public override AnimatedGraphicsComponent graphicsComponent => throw new System.NotImplementedException();
|
||||
public override StaticGraphicsComponent graphicsComponent => throw new System.NotImplementedException();
|
||||
|
||||
public Interactable(Vector2 position) : base(position)
|
||||
{
|
||||
|
|
|
@ -6,12 +6,13 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.LivingEntities.Player
|
||||
{
|
||||
internal class LootData
|
||||
class LootData
|
||||
{
|
||||
public Dictionary<string, int> loots;
|
||||
public void AddLoot(object lootObject, int quantity)
|
||||
{
|
||||
|
||||
public void AddLoot(string lootName, int quantity)
|
||||
{
|
||||
loots.Add(lootName, quantity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ClientToServer;
|
||||
|
@ -21,6 +22,7 @@ public class Player : LivingEntity
|
|||
private float speed;
|
||||
private int health;
|
||||
public override GraphicsComponent graphicsComponent { get; } = new AnimatedGraphicsComponent(new List<string> { "player_running_top_rotate" }, "player_running_top_rotate");
|
||||
private LootData lootData;
|
||||
public Player(Vector2 position) : base(position)
|
||||
{
|
||||
//InputWeaponRotation = new Vector2(0, 0);
|
||||
|
@ -33,17 +35,20 @@ public class Player : LivingEntity
|
|||
public override void Update()
|
||||
{
|
||||
|
||||
|
||||
MovementLogic();
|
||||
}
|
||||
float t;
|
||||
public void MovementLogic()
|
||||
{
|
||||
velocity.X = (float)Math.Sin(t);
|
||||
//velocity.X = 3+(float)Math.Sin(t);
|
||||
t++;
|
||||
if (InputPlayerRotation.X > 0.9)
|
||||
{
|
||||
}
|
||||
if (Keyboard.GetState().IsKeyDown(Keys.D)) velocity.X = 5;
|
||||
if (Keyboard.GetState().IsKeyDown(Keys.A)) velocity.X = -5;
|
||||
if (Keyboard.GetState().IsKeyDown(Keys.S)) velocity.Y = 5;
|
||||
if (Keyboard.GetState().IsKeyDown(Keys.W)) velocity.Y = -5;
|
||||
}
|
||||
public void HandleNewInput(UpdateInput updateInput)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace ZoFo.GameCore.GameObjects.MapObjects
|
|||
{
|
||||
public virtual bool IsColliderOn { get; protected set; } = true;//Who added that?
|
||||
public Rectangle sourceRectangle;
|
||||
public override AnimatedGraphicsComponent graphicsComponent { get; } = new();
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new StaticGraphicsComponent();
|
||||
|
||||
/// <summary>
|
||||
/// Создается простой объект на карте - no animations, только где, насколько крупно рисовать, по какой сорс ректанглу рисовать и из какой текстуры
|
||||
|
@ -27,9 +27,9 @@ namespace ZoFo.GameCore.GameObjects.MapObjects
|
|||
/// <param name="textureName"></param>
|
||||
public MapObject(Vector2 position, Vector2 size, Rectangle sourceRectangle, string textureName) : base(position)
|
||||
{
|
||||
this.sourceRectangle = sourceRectangle;
|
||||
graphicsComponent.ObjectDrawRectangle = new Rectangle((int)position.X, (int)position.Y, (int)size.X, (int)size.Y);
|
||||
graphicsComponent._textureName = textureName;
|
||||
graphicsComponent.BuildComponent(textureName);
|
||||
graphicsComponent.ObjectDrawRectangle = new Rectangle((int)position.X, (int)position.Y, (int)size.X, (int)size.Y);
|
||||
graphicsComponent.LoadContent();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,23 +1,32 @@
|
|||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using ZoFo.GameCore.GameManagers.CollisionManager;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
||||
|
||||
public class StopObject : MapObject
|
||||
{
|
||||
CollisionComponent[] collisionComponent;
|
||||
public CollisionComponent[] collisionComponents;
|
||||
|
||||
|
||||
public StopObject(Vector2 position, Vector2 size, Rectangle sourceRectangle, string textureName, Rectangle[] collisions) : base(position, size, sourceRectangle, textureName)
|
||||
{
|
||||
collisionComponent = new CollisionComponent[collisions.Length];
|
||||
for (int i = 0; i < collisionComponent.Length; i++)
|
||||
|
||||
collisionComponents = new CollisionComponent[collisions.Length];
|
||||
for (int i = 0; i < collisionComponents.Length; i++)
|
||||
{
|
||||
collisionComponent[i] = new CollisionComponent(this, true, collisions[i]);
|
||||
collisionComponents[i] = new CollisionComponent(this, true, new Rectangle(0,0, (int)size.X, (int)size.Y)/*collisions[i]*/);
|
||||
}
|
||||
//REDO
|
||||
// TODO: Написать коллизию, пусть тразмер будет чисто таким же как и текстурка.
|
||||
// Поменяйте уровень защиты конструктора, после снимите в MapManager комментарий в методе LoadMap с создания StopObject-а
|
||||
}
|
||||
public override void Draw(SpriteBatch spriteBatch)
|
||||
{
|
||||
base.Draw(spriteBatch);
|
||||
DrawDebugRectangle(spriteBatch, new Rectangle((int)position.X, (int)position.Y, collisionComponents[0].stopRectangle.Width, collisionComponents[0].stopRectangle.Height));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,17 +12,16 @@ namespace ZoFo.GameCore.Graphics
|
|||
public class AnimatedGraphicsComponent : GraphicsComponent
|
||||
{
|
||||
|
||||
|
||||
|
||||
public event Action<string> OnAnimationEnd;
|
||||
private List<AnimationContainer> animations;
|
||||
public event Action<string> actionOfAnimationEnd;
|
||||
public List<AnimationContainer> animations;
|
||||
private List<Texture2D> textures;
|
||||
public List<string> texturesNames; //rethink public and following that errors
|
||||
private List<string> texturesNames;
|
||||
private AnimationContainer currentAnimation;
|
||||
|
||||
public bool animating = true;
|
||||
private int step = 1;
|
||||
|
||||
static public int scaling = 6;
|
||||
static public int Camera_XW=800;
|
||||
static public int Camera_YH = 400;
|
||||
static public Vector2 CameraSize = new Vector2(1800, 960);
|
||||
public int parentId;
|
||||
public AnimationContainer CurrentAnimation
|
||||
{
|
||||
get
|
||||
|
@ -36,7 +35,7 @@ namespace ZoFo.GameCore.Graphics
|
|||
get { return currentAnimation.Id; }
|
||||
}
|
||||
|
||||
private AnimationContainer idleAnimation;
|
||||
private AnimationContainer neitralAnimation;
|
||||
//private SpriteBatch _spriteBatch;
|
||||
|
||||
private int currentFrame;
|
||||
|
@ -47,33 +46,34 @@ namespace ZoFo.GameCore.Graphics
|
|||
return currentFrame;
|
||||
}
|
||||
}
|
||||
|
||||
// Needed to ckeck whether the frame has changed since last update call
|
||||
private int lastUpdateCallFrame;
|
||||
public int LastUpdateCallFrame
|
||||
{
|
||||
get
|
||||
{
|
||||
return lastUpdateCallFrame;
|
||||
}
|
||||
}
|
||||
public int CurrentFrameInterval { get => interval; }
|
||||
public void Force_Set_CurrentFrameInterval(int newFrameInterval) { }
|
||||
private int interval;
|
||||
private int lastInterval;
|
||||
private Rectangle sourceRectangle;
|
||||
public AnimatedGraphicsComponent(List<string> animationsId, string neitralAnimationId, Rectangle objectDrawRectangle = new())
|
||||
public AnimatedGraphicsComponent(List<string> animationsId, string neitralAnimationId)
|
||||
{
|
||||
ObjectDrawRectangle = objectDrawRectangle;
|
||||
//this._spriteBatch = _spriteBatch;
|
||||
currentFrame = 0;
|
||||
lastInterval = 1;
|
||||
LoadAnimations(animationsId, neitralAnimationId);
|
||||
currentAnimation = idleAnimation;
|
||||
currentAnimation = neitralAnimation;
|
||||
SetInterval();
|
||||
buildSourceRectangle();
|
||||
}
|
||||
|
||||
|
||||
public AnimatedGraphicsComponent(string textureName)
|
||||
{
|
||||
BuildComponent(textureName);
|
||||
}
|
||||
public AnimatedGraphicsComponent()
|
||||
{
|
||||
}
|
||||
public void BuildComponent(string textureName)
|
||||
{
|
||||
mainTextureName = textureName;
|
||||
//texturesNames.Add(textureName);//Added by SD
|
||||
animations = new List<AnimationContainer>();
|
||||
textures = new List<Texture2D>();
|
||||
var texture = AppManager.Instance.Content.Load<Texture2D>(textureName);
|
||||
|
@ -87,7 +87,7 @@ namespace ZoFo.GameCore.Graphics
|
|||
animationContainer.FrameTime = new List<Tuple<int, int>>() { new Tuple<int, int>(0, 10) };
|
||||
animationContainer.Id = texture.Name;
|
||||
currentAnimation = animationContainer;
|
||||
idleAnimation = animationContainer;
|
||||
neitralAnimation = animationContainer;
|
||||
animations.Add(animationContainer);
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ namespace ZoFo.GameCore.Graphics
|
|||
animations.Add(AppManager.Instance.animationBuilder.Animations.Find(x => x.Id == id));
|
||||
if (id == neitralAnimationId)
|
||||
{
|
||||
idleAnimation = animations.Last();
|
||||
neitralAnimation = animations.Last();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,11 +109,6 @@ namespace ZoFo.GameCore.Graphics
|
|||
textures = new List<Texture2D>();
|
||||
texturesNames = new List<string>();
|
||||
|
||||
if (animations is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var animation in animations)
|
||||
{
|
||||
if (!texturesNames.Contains(animation.TextureName))
|
||||
|
@ -124,74 +119,46 @@ namespace ZoFo.GameCore.Graphics
|
|||
}
|
||||
}
|
||||
|
||||
public void AnimationSelect(string animationId, bool reverse = false)
|
||||
public void StartAnimation(string startedanimationId)
|
||||
{
|
||||
currentAnimation = animations.Find(x => x.Id == animationId);
|
||||
if (reverse)
|
||||
{
|
||||
currentFrame = currentAnimation.FramesCount;
|
||||
step = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
step = 1;
|
||||
currentFrame = 1;
|
||||
}
|
||||
currentFrame = 0;
|
||||
currentAnimation = animations.Find(x => x.Id == startedanimationId);
|
||||
|
||||
buildSourceRectangle();
|
||||
SetInterval();
|
||||
}
|
||||
|
||||
public void StartAnimation()
|
||||
{
|
||||
animating = true;
|
||||
}
|
||||
|
||||
public void AnimationStep()
|
||||
{
|
||||
currentFrame += step;
|
||||
}
|
||||
|
||||
public void SetFrame(int frame)
|
||||
{
|
||||
currentFrame = frame;
|
||||
}
|
||||
|
||||
public void StopAnimation()
|
||||
{
|
||||
currentFrame = 0;
|
||||
interval = 0;
|
||||
currentAnimation = idleAnimation;
|
||||
currentAnimation = neitralAnimation;
|
||||
buildSourceRectangle();
|
||||
SetInterval();
|
||||
}
|
||||
|
||||
private void AnimationEnd()
|
||||
public override void Update()
|
||||
{
|
||||
lastUpdateCallFrame = currentFrame;
|
||||
if (interval == 0)
|
||||
{
|
||||
currentFrame++;
|
||||
if (currentAnimation.FramesCount <= currentFrame)
|
||||
{
|
||||
if (!currentAnimation.IsCycle)
|
||||
{
|
||||
if (OnAnimationEnd != null)
|
||||
if (actionOfAnimationEnd != null)
|
||||
{
|
||||
OnAnimationEnd(currentAnimation.Id);
|
||||
actionOfAnimationEnd(currentAnimation.Id);
|
||||
}
|
||||
currentAnimation = idleAnimation;
|
||||
animating = false;
|
||||
currentAnimation = neitralAnimation;
|
||||
|
||||
}
|
||||
|
||||
currentFrame = 0;
|
||||
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
if (currentAnimation.FramesCount <= currentFrame || currentFrame < 0)
|
||||
{
|
||||
AnimationEnd();
|
||||
}
|
||||
|
||||
if (!animating)
|
||||
return;
|
||||
|
||||
if (interval == 0)
|
||||
{
|
||||
currentFrame += step;
|
||||
buildSourceRectangle();
|
||||
SetInterval();
|
||||
}
|
||||
|
@ -199,11 +166,9 @@ namespace ZoFo.GameCore.Graphics
|
|||
interval--;
|
||||
}
|
||||
|
||||
|
||||
public override void Draw(Rectangle destinationRectangle, SpriteBatch _spriteBatch)
|
||||
{
|
||||
Texture2D texture = textures[texturesNames.FindIndex(x => x == currentAnimation.TextureName)];
|
||||
|
||||
float scale;
|
||||
if (currentAnimation.Offset.X != 0)
|
||||
{
|
||||
|
@ -225,13 +190,10 @@ namespace ZoFo.GameCore.Graphics
|
|||
destinationRectangle = Scaling(destinationRectangle);
|
||||
_spriteBatch.Draw(texture,
|
||||
destinationRectangle, sourceRectangle, Color.White);
|
||||
|
||||
}
|
||||
public override void Draw(Rectangle destinationRectangle, SpriteBatch _spriteBatch, Rectangle sourceRectangle)
|
||||
{
|
||||
|
||||
Texture2D texture = textures[texturesNames.FindIndex(x => x == currentAnimation.TextureName)];
|
||||
|
||||
float scale;
|
||||
if (currentAnimation.Offset.X != 0)
|
||||
{
|
||||
|
@ -254,12 +216,20 @@ namespace ZoFo.GameCore.Graphics
|
|||
_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();
|
||||
if (currentAnimation == null)
|
||||
{
|
||||
currentAnimation = idleAnimation;
|
||||
currentAnimation = neitralAnimation;
|
||||
}
|
||||
sourceRectangle.X = currentAnimation.StartSpriteRectangle.X + currentFrame *
|
||||
(currentAnimation.StartSpriteRectangle.Width + currentAnimation.TextureFrameInterval);
|
||||
|
@ -281,35 +251,6 @@ namespace ZoFo.GameCore.Graphics
|
|||
interval = lastInterval;
|
||||
}
|
||||
}
|
||||
public static void SetCameraPosition(Vector2 playerPosition)
|
||||
{
|
||||
CameraPosition = (playerPosition).ToPoint();
|
||||
CameraPosition.X -= 200;
|
||||
CameraPosition.Y -= 120;
|
||||
|
||||
// TODO
|
||||
/*
|
||||
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(0, 0);
|
||||
}
|
||||
}
|
||||
|
|
6
ZoFo/GameCore/Graphics/AnimationComponent.cs
Normal file
6
ZoFo/GameCore/Graphics/AnimationComponent.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
namespace ZoFo.GameCore.Graphics;
|
||||
|
||||
public class AnimationComponent
|
||||
{
|
||||
|
||||
}
|
|
@ -12,33 +12,38 @@ namespace ZoFo.GameCore.Graphics
|
|||
public class StaticGraphicsComponent : GraphicsComponent
|
||||
{
|
||||
private Texture2D texture;
|
||||
private string textureName;
|
||||
|
||||
public string _textureName;
|
||||
|
||||
public StaticGraphicsComponent()
|
||||
{
|
||||
|
||||
LoadContent();
|
||||
}
|
||||
|
||||
public StaticGraphicsComponent(string textureName)
|
||||
{
|
||||
BuildComponent(textureName);
|
||||
LoadContent();
|
||||
}
|
||||
|
||||
public void BuildComponent(string textureName)
|
||||
{
|
||||
this.textureName = textureName;
|
||||
_textureName = textureName;
|
||||
}
|
||||
|
||||
|
||||
public override void LoadContent()
|
||||
{
|
||||
texture = AppManager.Instance.Content.Load<Texture2D>(textureName);
|
||||
if (_textureName is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
texture = AppManager.Instance.Content.Load<Texture2D>(_textureName);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
}
|
||||
|
||||
public override void Draw(Rectangle destinationRectangle, SpriteBatch _spriteBatch)
|
||||
|
|
|
@ -15,9 +15,11 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates;
|
|||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameObjects;
|
||||
using ZoFo.GameCore.GameObjects.Entities;
|
||||
using ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
||||
using ZoFo.GameCore.GameObjects.Entities.LivingEntities.Enemies;
|
||||
using ZoFo.GameCore.GameObjects.Entities.LivingEntities.Player;
|
||||
using ZoFo.GameCore.GameObjects.MapObjects;
|
||||
using ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
|
||||
|
||||
namespace ZoFo.GameCore
|
||||
{
|
||||
|
@ -26,7 +28,6 @@ namespace ZoFo.GameCore
|
|||
private ServerNetworkManager networkManager;
|
||||
private int ticks = 0;
|
||||
public IPEndPoint MyIp { get { return networkManager.InfoConnect; } }
|
||||
|
||||
public Server()
|
||||
{
|
||||
networkManager = new ServerNetworkManager();
|
||||
|
@ -54,6 +55,32 @@ namespace ZoFo.GameCore
|
|||
{
|
||||
|
||||
//ТУТ Switch case будет честное слово
|
||||
switch (updateData.UpdateType)
|
||||
{
|
||||
case "UpdateAnimation":
|
||||
break;
|
||||
case "UpdateEntityHealth":
|
||||
break;
|
||||
case "UpdateGameEnded":
|
||||
break;
|
||||
case "UpdateGameObjectCreated":
|
||||
break;
|
||||
case "UpdateGameObjectDeleted":
|
||||
break;
|
||||
case "UpdateInteraction":
|
||||
break;
|
||||
case "UpdateInteractionReady":
|
||||
break;
|
||||
case "UpdateLoot":
|
||||
break;
|
||||
case "UpdatePlayerParametrs":
|
||||
break;
|
||||
case "UpdatePosition":
|
||||
break;
|
||||
case "UpdateTileCreated":
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseConnection()
|
||||
|
@ -95,13 +122,11 @@ namespace ZoFo.GameCore
|
|||
collisionManager = new CollisionManager();
|
||||
gameObjects = new List<GameObject>();
|
||||
entities = new List<Entity>();
|
||||
//new MapManager().LoadMap();
|
||||
new MapManager().LoadMap();
|
||||
|
||||
AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(40, 40)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(140, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(300, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(450, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(140, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Player(new Vector2(740, 140)));
|
||||
AppManager.Instance.server.RegisterGameObject(new Ammo(new Vector2(140, 440)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -141,6 +166,23 @@ namespace ZoFo.GameCore
|
|||
{
|
||||
|
||||
gameObjects.Add(gameObject);
|
||||
if (gameObject is StopObject)
|
||||
{
|
||||
AddData(new UpdateStopObjectCreated()
|
||||
{
|
||||
Position = (gameObject as StopObject).position,
|
||||
sourceRectangle = (gameObject as StopObject).sourceRectangle,
|
||||
Size = (gameObject as StopObject).graphicsComponent.ObjectDrawRectangle.Size,
|
||||
collisions = (gameObject as StopObject).collisionComponents.Select(x=>x.stopRectangle).ToArray(),
|
||||
tileSetName = (gameObject as StopObject).graphicsComponent.mainTextureName
|
||||
});//TODO
|
||||
foreach (var item in (gameObject as StopObject).collisionComponents)
|
||||
{
|
||||
collisionManager.Register(item);
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (gameObject is MapObject)
|
||||
{
|
||||
AddData(new UpdateTileCreated()
|
||||
|
@ -154,11 +196,14 @@ namespace ZoFo.GameCore
|
|||
}
|
||||
if (gameObject is Entity)
|
||||
{
|
||||
AddData(new UpdateGameObjectCreated() { GameObjectType = gameObject.GetType().Name, IdEntity = (gameObject as Entity).Id });
|
||||
AddData(new UpdateGameObjectCreated() { GameObjectType = gameObject.GetType().Name, IdEntity = (gameObject as Entity).Id,
|
||||
position = gameObject.position});
|
||||
collisionManager.Register((gameObject as Entity).collisionComponent);
|
||||
}
|
||||
else
|
||||
AddData(new UpdateGameObjectCreated() { GameObjectType = gameObject.GetType().Name });
|
||||
AddData(new UpdateGameObjectCreated() { GameObjectType = gameObject.GetType().Name,
|
||||
position = gameObject.position
|
||||
});
|
||||
|
||||
|
||||
////var elems = gameObject.GetType().GetProperties(System.Reflection.BindingFlags.Public);
|
||||
|
|
Loading…
Add table
Reference in a new issue