Merge pull request #76 from progtime-net/MapDevelopment

Дописал/переаисал Collectbles и его наследников, добавли кучу иконок,…
This commit is contained in:
Andrey 2024-08-19 00:48:36 +03:00 committed by GitHub
commit 57f130e6f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 1122 additions and 77 deletions

View file

@ -37,6 +37,9 @@
#begin MapData/TileMaps/main.tmj #begin MapData/TileMaps/main.tmj
/copy:MapData/TileMaps/main.tmj /copy:MapData/TileMaps/main.tmj
#begin MapData/TileSets/IconSet.tsj
/copy:MapData/TileSets/IconSet.tsj
#begin MapData/TileSets/tileset 1 collision.tsj #begin MapData/TileSets/tileset 1 collision.tsj
/copy:MapData/TileSets/tileset 1 collision.tsj /copy:MapData/TileSets/tileset 1 collision.tsj
@ -607,6 +610,810 @@
/processorParam:TextureFormat=Color /processorParam:TextureFormat=Color
/build:Textures/icons/9.png /build:Textures/icons/9.png
#begin Textures/icons/Collectables/Ammo.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/Collectables/Ammo.png
#begin Textures/icons/Collectables/BottleOfWater.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/Collectables/BottleOfWater.png
#begin Textures/icons/Collectables/Peeble.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/Collectables/Peeble.png
#begin Textures/icons/Collectables/PureBottleOfWater.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/Collectables/PureBottleOfWater.png
#begin Textures/icons/Collectables/RottenFlesh.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/Collectables/RottenFlesh.png
#begin Textures/icons/Collectables/Steel.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/Collectables/Steel.png
#begin Textures/icons/Collectables/Wood.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/Collectables/Wood.png
#begin Textures/icons/Material/Fabric.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/Material/Fabric.png
#begin Textures/icons/Material/Leather.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/Material/Leather.png
#begin Textures/icons/Material/Paper.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/Material/Paper.png
#begin Textures/icons/Material/Rope.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/Material/Rope.png
#begin Textures/icons/Material/String.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/Material/String.png
#begin Textures/icons/Material/Wooden Plank.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/Material/Wooden Plank.png
#begin Textures/icons/Material/Wool.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/Material/Wool.png
#begin Textures/icons/Misc/Book 2.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/Misc/Book 2.png
#begin Textures/icons/Misc/Book 3.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/Misc/Book 3.png
#begin Textures/icons/Misc/Book.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/Misc/Book.png
#begin Textures/icons/Misc/Candle.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/Misc/Candle.png
#begin Textures/icons/Misc/Chest.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/Misc/Chest.png
#begin Textures/icons/Misc/Copper Coin.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/Misc/Copper Coin.png
#begin Textures/icons/Misc/Crate.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/Misc/Crate.png
#begin Textures/icons/Misc/Envolop.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/Misc/Envolop.png
#begin Textures/icons/Misc/Gear.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/Misc/Gear.png
#begin Textures/icons/Misc/Golden Coin.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/Misc/Golden Coin.png
#begin Textures/icons/Misc/Golden Key.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/Misc/Golden Key.png
#begin Textures/icons/Misc/Heart.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/Misc/Heart.png
#begin Textures/icons/Misc/Iron Key.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/Misc/Iron Key.png
#begin Textures/icons/Misc/Lantern.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/Misc/Lantern.png
#begin Textures/icons/Misc/Map.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/Misc/Map.png
#begin Textures/icons/Misc/Rune Stone.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/Misc/Rune Stone.png
#begin Textures/icons/Misc/Scroll.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/Misc/Scroll.png
#begin Textures/icons/Misc/Silver Coin.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/Misc/Silver Coin.png
#begin Textures/icons/Misc/Silver Key.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/Misc/Silver Key.png
#begin Textures/icons/Monster Part/Bone.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/Monster Part/Bone.png
#begin Textures/icons/Monster Part/Egg.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/Monster Part/Egg.png
#begin Textures/icons/Monster Part/Feather.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/Monster Part/Feather.png
#begin Textures/icons/Monster Part/Monster Egg.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/Monster Part/Monster Egg.png
#begin Textures/icons/Monster Part/Monster Eye.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/Monster Part/Monster Eye.png
#begin Textures/icons/Monster Part/Skull.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/Monster Part/Skull.png
#begin Textures/icons/Monster Part/Slime Gel.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/Monster Part/Slime Gel.png
#begin Textures/icons/Ore & Gem/Coal.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/Ore & Gem/Coal.png
#begin Textures/icons/Ore & Gem/Copper Ingot.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/Ore & Gem/Copper Ingot.png
#begin Textures/icons/Ore & Gem/Copper Nugget.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/Ore & Gem/Copper Nugget.png
#begin Textures/icons/Ore & Gem/Crystal.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/Ore & Gem/Crystal.png
#begin Textures/icons/Ore & Gem/Cut Emerald.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/Ore & Gem/Cut Emerald.png
#begin Textures/icons/Ore & Gem/Cut Ruby.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/Ore & Gem/Cut Ruby.png
#begin Textures/icons/Ore & Gem/Cut Sapphire.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/Ore & Gem/Cut Sapphire.png
#begin Textures/icons/Ore & Gem/Cut Topaz.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/Ore & Gem/Cut Topaz.png
#begin Textures/icons/Ore & Gem/Diamond.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/Ore & Gem/Diamond.png
#begin Textures/icons/Ore & Gem/Emerald.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/Ore & Gem/Emerald.png
#begin Textures/icons/Ore & Gem/Gold Nugget.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/Ore & Gem/Gold Nugget.png
#begin Textures/icons/Ore & Gem/Golden Ingot.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/Ore & Gem/Golden Ingot.png
#begin Textures/icons/Ore & Gem/Obsidian.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/Ore & Gem/Obsidian.png
#begin Textures/icons/Ore & Gem/Pearl.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/Ore & Gem/Pearl.png
#begin Textures/icons/Ore & Gem/Ruby.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/Ore & Gem/Ruby.png
#begin Textures/icons/Ore & Gem/Sapphire.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/Ore & Gem/Sapphire.png
#begin Textures/icons/Ore & Gem/Silver Nugget.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/Ore & Gem/Silver Nugget.png
#begin Textures/icons/Ore & Gem/Topaz.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/Ore & Gem/Topaz.png
#begin Textures/icons/Potion/Blue Potion 2.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/Potion/Blue Potion 2.png
#begin Textures/icons/Potion/Blue Potion 3.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/Potion/Blue Potion 3.png
#begin Textures/icons/Potion/Empty Bottle.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/Potion/Empty Bottle.png
#begin Textures/icons/Potion/Green Potion 2.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/Potion/Green Potion 2.png
#begin Textures/icons/Potion/Green Potion 3.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/Potion/Green Potion 3.png
#begin Textures/icons/Potion/Green Potion.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/Potion/Green Potion.png
#begin Textures/icons/Potion/Red Potion 2.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/Potion/Red Potion 2.png
#begin Textures/icons/Potion/Red Potion 3.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/Potion/Red Potion 3.png
#begin Textures/icons/Potion/Red Potion.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/Potion/Red Potion.png
#begin Textures/Test/pickaxe.webp #begin Textures/Test/pickaxe.webp
/importer:TextureImporter /importer:TextureImporter
/processor:TextureProcessor /processor:TextureProcessor

View file

@ -10,6 +10,9 @@
"TileMaps" "TileMaps"
], ],
"fileStates": { "fileStates": {
"": {
"scaleInDock": 1
},
"TileMaps/TileSets/TileSet 1.tsj": { "TileMaps/TileSets/TileSet 1.tsj": {
"scaleInDock": 1 "scaleInDock": 1
}, },
@ -21,15 +24,24 @@
"y": 553.0303030303031 "y": 553.0303030303031
} }
}, },
"TileMaps/main.tmj#IconSet": {
"dynamicWrapping": true,
"scaleInEditor": 1
},
"TileSets/CollisionTileSet.tsj": { "TileSets/CollisionTileSet.tsj": {
"scaleInDock": 0.75, "scaleInDock": 0.75,
"scaleInEditor": 1 "scaleInEditor": 1
}, },
"TileSets/IconSet.tsj": {
"dynamicWrapping": true
},
"TileSets/TileSet 1.tsj": { "TileSets/TileSet 1.tsj": {
"dynamicWrapping": false,
"scaleInDock": 1, "scaleInDock": 1,
"scaleInEditor": 1.5 "scaleInEditor": 1.5
}, },
"TileSets/TilesetNature.tsj": { "TileSets/TilesetNature.tsj": {
"dynamicWrapping": false
"scaleInDock": 1 "scaleInDock": 1
}, },
"TileSets/WallSet.tsj": { "TileSets/WallSet.tsj": {
@ -40,7 +52,8 @@
"scaleInDock": 1 "scaleInDock": 1
} }
}, },
"last.imagePath": "D:/C#/Я смотрел ваши ХАКАТОНЫ/ZoFo/ZoFo/Content/Textures/TileSetImages", "last.imagePath": "D:/C#/Я смотрел ваши ХАКАТОНЫ/ZoFo/ZoFo/Content/Textures/icons",
"last.objectTemplatePath": "D:/C#/Я смотрел ваши ХАКАТОНЫ/ZoFo/ZoFo/Content/MapData/Templates",
"openFiles": [ "openFiles": [
"TileSets/TileSet 1.tsj", "TileSets/TileSet 1.tsj",
"TileMaps/main.tmj" "TileMaps/main.tmj"
@ -52,12 +65,14 @@
"TileSets/CollisionTileSet.tsj", "TileSets/CollisionTileSet.tsj",
"TileSets/WallSet.tsj" "TileSets/WallSet.tsj"
], ],
"stampsFolder": "C:/Users/artem/source/repos/ZoFo/ZoFo/Content/MapData/TileStamps", "stampsFolder": "D:/C#/Я смотрел ваши ХАКАТОНЫ/ZoFo/ZoFo/Content/MapData/TileStamps",
"tileset.embedInMap": false,
"tileset.lastUsedFormat": "json", "tileset.lastUsedFormat": "json",
"tileset.margin": 0, "tileset.margin": 0,
"tileset.spacing": 0, "tileset.spacing": 0,
"tileset.tileSize": { "tileset.tileSize": {
"height": 16, "height": 16,
"width": 16 "width": 16
} },
"tileset.type": 1
} }

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":1,
"height":16,
"id":13,
"name":"Ammo",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":3,
"height":16,
"id":11,
"name":"BottleOfWater",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":7,
"height":16,
"id":17,
"name":"Peeble",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":2,
"height":16,
"id":10,
"name":"PureBottleOfWater",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":6,
"height":16,
"id":16,
"name":"RottenFlesh",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":5,
"height":16,
"id":15,
"name":"Steel",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,18 @@
{ "object":
{
"gid":4,
"height":16,
"id":12,
"name":"Wood",
"rotation":0,
"type":"",
"visible":true,
"width":16
},
"tileset":
{
"firstgid":1,
"source":"..\/TileSets\/IconSet.tsj"
},
"type":"template"
}

View file

@ -0,0 +1,60 @@
{ "columns":0,
"grid":
{
"height":1,
"orientation":"orthogonal",
"width":1
},
"margin":0,
"name":"IconSet",
"spacing":0,
"tilecount":7,
"tiledversion":"1.10.2",
"tileheight":1200,
"tiles":[
{
"id":0,
"image":"..\/..\/Textures\/icons\/Collectables\/ammunition.png",
"imageheight":512,
"imagewidth":512
},
{
"id":1,
"image":"..\/..\/Textures\/icons\/Collectables\/Blue Potion.png",
"imageheight":32,
"imagewidth":32
},
{
"id":2,
"image":"..\/..\/Textures\/icons\/Collectables\/Water Bottle.png",
"imageheight":32,
"imagewidth":32
},
{
"id":3,
"image":"..\/..\/Textures\/icons\/Collectables\/Wood Log.png",
"imageheight":32,
"imagewidth":32
},
{
"id":4,
"image":"..\/..\/Textures\/icons\/Collectables\/Silver Ingot.png",
"imageheight":32,
"imagewidth":32
},
{
"id":5,
"image":"..\/..\/Textures\/icons\/Collectables\/Monster Meat.png",
"imageheight":32,
"imagewidth":32
},
{
"id":6,
"image":"..\/..\/Textures\/icons\/Collectables\/Stone.png",
"imageheight":1200,
"imagewidth":1200
}],
"tilewidth":1200,
"type":"tileset",
"version":"1.10"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -10,11 +10,14 @@ namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
public class Layer public class Layer
{ {
public List<Chunk> Chunks { get; set; } public List<Chunk> Chunks { get; set; }
public List<Object> Objects { get; set; }
public int Height { get; set; } public int Height { get; set; }
public int Width { get; set; } public int Width { get; set; }
public int Id { get; set; } public int Id { get; set; }
public bool Visibility { get; set; } public bool Visibility { get; set; }
public string Class { get; set; } public string Class { get; set; }
public string Type { get; set; } public string Type { get; set; }
public string Name { get; set; }
} }
} }

View file

@ -4,13 +4,16 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
{ {
public class Object public class Object
{ {
public double Height { get; set; } public double Height { get; set; }
public double Width { get; set; } public double Width { get; set; }
public double X { get; set; } public float X { get; set; }
public double Y { get; set; } public float Y { get; set; }
public string Template { get; set; }
public string Type { get; set; }
} }
} }

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.MapManager.MapElements;
namespace ZoFo.GameCore.GameManagers.MapManager.MapElements
{
public class Template
{
public Object Object { get; set; }
public string Type { get; set; }
}
}

View file

@ -9,6 +9,7 @@ using System.Text;
using System.Text.Json; using System.Text.Json;
using System.Threading.Tasks; using System.Threading.Tasks;
using ZoFo.GameCore.GameManagers.MapManager.MapElements; using ZoFo.GameCore.GameManagers.MapManager.MapElements;
using ZoFo.GameCore.GameObjects;
using ZoFo.GameCore.GameObjects.MapObjects; using ZoFo.GameCore.GameObjects.MapObjects;
using ZoFo.GameCore.GameObjects.MapObjects.StopObjects; using ZoFo.GameCore.GameObjects.MapObjects.StopObjects;
@ -17,9 +18,16 @@ namespace ZoFo.GameCore.GameManagers.MapManager
public class MapManager public class MapManager
{ {
private static readonly string _templatePath = "Content/MapData/TileMaps/{0}.tmj"; private static readonly string _templatePath = "Content/MapData/TileMaps/{0}.tmj";
private static readonly JsonSerializerOptions _options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; // Задача настроек для JsonSerialize
private static readonly Dictionary<string, string> _classPath = new Dictionary<string, string>() {
{ "Collectables", "ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables." },
{ "Enemies", "ZoFo.GameCore.GameObjects.Entities.LivingEntities.Enemies." }
};
//private static readonly float _scale = 1.0f; //private static readonly float _scale = 1.0f;
private List<TileSet> _tileSets = new List<TileSet>(); private List<TileSet> _tileSets = new List<TileSet>();
private TileMap _tileMap = new TileMap();
/// <summary> /// <summary>
/// Загрузка карты. Передаётся название файла карты. По умолчанию main. /// Загрузка карты. Передаётся название файла карты. По умолчанию main.
@ -28,86 +36,95 @@ namespace ZoFo.GameCore.GameManagers.MapManager
public void LoadMap(string mapName = "main") public void LoadMap(string mapName = "main")
{ {
// Загрузка TileMap // Загрузка TileMap
var options = new JsonSerializerOptions _tileMap = JsonSerializer.Deserialize<TileMap>(File.ReadAllText(string.Format(_templatePath, mapName)), _options);
{
PropertyNameCaseInsensitive = true
};
TileMap tileMap =
JsonSerializer.Deserialize<TileMap>(File.ReadAllText(Path.Combine(AppContext.BaseDirectory, string.Format(_templatePath, mapName))), options);
// Загрузка TileSet-ов по TileSetInfo // Загрузка TileSet-ов по TileSetInfo
List<TileSet> tileSets = new List<TileSet>(); foreach (TileSetInfo tileSetInfo in _tileMap.TileSets)
foreach (TileSetInfo tileSetInfo in tileMap.TileSets)
{ {
TileSet tileSet = LoadTileSet(Path.Combine(AppContext.BaseDirectory, "Content", "MapData", "TileMaps", tileSetInfo.Source)); TileSet tileSet = LoadTileSet(Path.Combine(AppContext.BaseDirectory, "Content", "MapData", "TileMaps", tileSetInfo.Source));
tileSet.FirstGid = tileSetInfo.FirstGid; tileSet.FirstGid = tileSetInfo.FirstGid;
tileSets.Add(tileSet); _tileSets.Add(tileSet);
} }
tileSets.Reverse(); _tileSets.Reverse();
foreach (var layer in tileMap.Layers)
foreach (var layer in _tileMap.Layers)
{ {
if (layer.Type == "objectgroup") if (layer.Type == "objectgroup")
{ {
ProcessObjectLayers(layer);
} }
else else
{ {
foreach (var chunk in layer.Chunks) ProcessTileLayers(layer);
}
}
}
private void ProcessTileLayers(Layer layer)
{
foreach (var chunk in layer.Chunks)
{
for (int i = 0; i < chunk.Data.Length; i++)
{
foreach (var tileSet in _tileSets)
{ {
for (int i = 0; i < chunk.Data.Length; i++) if (tileSet.FirstGid <= chunk.Data[i])
{ {
foreach (var tileSet in tileSets) int number = chunk.Data[i] - tileSet.FirstGid;
int relativeColumn = number % tileSet.Columns;
int relativeRow = number / tileSet.Columns; // относительно левого угла чанка
Rectangle sourceRectangle = new Rectangle(relativeColumn * (tileSet.TileWidth + tileSet.Spacing) + tileSet.Margin,
relativeRow * (tileSet.TileHeight + tileSet.Spacing) + tileSet.Margin,
tileSet.TileWidth, tileSet.TileHeight);
Vector2 position = new Vector2(
(i % chunk.Width) * _tileMap.TileWidth + chunk.X * _tileMap.TileWidth,
(i / chunk.Height) * _tileMap.TileHeight + chunk.Y * _tileMap.TileHeight);
Tile tile = tileSet.Tiles[number]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile
switch (tile.Type)
{ {
if (tileSet.FirstGid <= chunk.Data[i]) case "Tile":
{ AppManager.Instance.server.RegisterGameObject(new MapObject(position,
int number = chunk.Data[i] - tileSet.FirstGid; new Vector2(tileSet.TileWidth, tileSet.TileHeight),
sourceRectangle,
int relativeColumn = number % tileSet.Columns; "Textures/TileSetImages/" + Path.GetFileName(tileSet.Image).Replace(".png", "")));
int relativeRow = number / tileSet.Columns; // относительно левого угла чанка break;
Rectangle sourceRectangle = new Rectangle(relativeColumn * (tileSet.TileWidth + tileSet.Spacing) + tileSet.Margin, case "StopObject":
relativeRow * (tileSet.TileHeight + tileSet.Spacing) + tileSet.Margin, var collisionRectangles = LoadRectangles(tile); // Грузит коллизии обьектов
tileSet.TileWidth, tileSet.TileHeight);
AppManager.Instance.server.RegisterGameObject(new StopObject(position,
Vector2 position = new Vector2( new Vector2(tileSet.TileWidth, tileSet.TileHeight),
(i % chunk.Width) * tileMap.TileWidth + chunk.X * tileMap.TileWidth, sourceRectangle,
(i / chunk.Height) * tileMap.TileHeight + chunk.Y * tileMap.TileHeight); "Textures/TileSetImages/" + Path.GetFileName(tileSet.Image).Replace(".png", ""),
collisionRectangles.ToArray()));
Tile tile = tileSet.Tiles[number]; // По факту может быть StopObjectom, но на уровне Tiled это все в первую очередь Tile break;
string textureName = Path.Combine(AppContext.BaseDirectory, "Content", "Textures", "TileSetImages",
Path.GetFileName(tileSet.Image).Replace(".png", "")); default:
switch (tile.Type)
{
case "Tile":
AppManager.Instance.server.RegisterGameObject(new MapObject(position,
new Vector2(tileSet.TileWidth, tileSet.TileHeight),
sourceRectangle,
textureName));
break;
case "StopObject":
var collisionRectangles = LoadRectangles(tile); // Грузит коллизии обьектов
AppManager.Instance.server.RegisterGameObject(new StopObject(position,
new Vector2(tileSet.TileWidth, tileSet.TileHeight),
sourceRectangle,
textureName,
collisionRectangles.ToArray()));
break;
default:
break;
}
break; break;
}
} }
break;
} }
} }
} }
} }
} }
private void ProcessObjectLayers(Layer layer)
{
foreach (var item in layer.Objects)
{
string type = Path.GetFileName(item.Template).Replace(".tj", "");
var collectable = Activator.CreateInstance(Type.GetType(_classPath[layer.Name] + type), new Vector2(item.X, item.Y));
AppManager.Instance.server.RegisterGameObject(collectable as GameObject);
}
}
/// <summary> /// <summary>
/// Загружает и парсит TileSet по его пути. /// Загружает и парсит TileSet по его пути.
/// </summary> /// </summary>
@ -115,15 +132,8 @@ namespace ZoFo.GameCore.GameManagers.MapManager
/// <returns></returns> /// <returns></returns>
private TileSet LoadTileSet(string path) private TileSet LoadTileSet(string path)
{ {
using (StreamReader reader = new StreamReader(path)) return JsonSerializer.Deserialize<TileSet>(File.ReadAllText(path), _options);
{
var options = new JsonSerializerOptions //TODO Remove
{
PropertyNameCaseInsensitive = true
};
string data = reader.ReadToEnd();
return JsonSerializer.Deserialize<TileSet>(data, options);
}
} }
/// <summary> /// <summary>
@ -146,5 +156,10 @@ namespace ZoFo.GameCore.GameManagers.MapManager
return collisionRectangles; return collisionRectangles;
} }
private MapElements.Object LoadObject(string path)
{
return JsonSerializer.Deserialize<MapElements.Object>(File.ReadAllText(path), _options);
}
} }
} }

View file

@ -15,7 +15,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
class Ammo:Collectable class Ammo:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("Textures/icons/8"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "Ammo");
public Ammo(Vector2 position) : base(position) public Ammo(Vector2 position) : base(position)
{ {
graphicsComponent.ObjectDrawRectangle.Width = 20; graphicsComponent.ObjectDrawRectangle.Width = 20;

View file

@ -14,7 +14,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
public class BottleOfWater : Collectable public class BottleOfWater : Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("BottleOfWater"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "BottleOfWater");
public BottleOfWater(Vector2 position) : base(position) public BottleOfWater(Vector2 position) : base(position)
{ {

View file

@ -7,6 +7,7 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables; namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
public class Collectable : Interactable public class Collectable : Interactable
{ {
protected static readonly string _path = "Textures/icons/Collectables/";
public Collectable(Vector2 position) : base(position) public Collectable(Vector2 position) : base(position)
{ {
} }

View file

@ -14,7 +14,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
public class Peeble:Collectable public class Peeble:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("Peeble"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "Peeble");
public Peeble(Vector2 position) : base(position) public Peeble(Vector2 position) : base(position)
{ {

View file

@ -13,7 +13,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
class PureBottleOfWater:Collectable class PureBottleOfWater:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("PureBottleOfWater"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "PureBottleOfWater");
public PureBottleOfWater(Vector2 position) : base(position) public PureBottleOfWater(Vector2 position) : base(position)
{ {

View file

@ -13,7 +13,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
class RottenFlesh:Collectable class RottenFlesh:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("RottenFlesh"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "RottenFlesh");
public RottenFlesh(Vector2 position) : base(position) public RottenFlesh(Vector2 position) : base(position)
{ {

View file

@ -13,7 +13,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
{ {
class Steel:Collectable class Steel:Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("Steel"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "Steel");
public Steel(Vector2 position) : base(position) public Steel(Vector2 position) : base(position)
{ {

View file

@ -9,7 +9,7 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
public class Wood : Collectable public class Wood : Collectable
{ {
public override StaticGraphicsComponent graphicsComponent { get; } = new("Wood"); public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "Wood");
public Wood(Vector2 position) : base(position) public Wood(Vector2 position) : base(position)
{ {