fixed map
This commit is contained in:
parent
1990f2ba56
commit
28487fdee6
12 changed files with 339 additions and 21 deletions
|
@ -44,6 +44,9 @@
|
|||
#begin MapData/TileMaps/main.tmj
|
||||
/copy:MapData/TileMaps/main.tmj
|
||||
|
||||
#begin MapData/TileSets/bonfire.tsj
|
||||
/copy:MapData/TileSets/bonfire.tsj
|
||||
|
||||
#begin MapData/TileSets/IconSet.tsj
|
||||
/copy:MapData/TileSets/IconSet.tsj
|
||||
|
||||
|
@ -1469,6 +1472,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/Test/wood.jpg
|
||||
|
||||
#begin Textures/TileSetImages/Campfire.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/Campfire.png
|
||||
|
||||
#begin Textures/TileSetImages/Pipes.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"fileStates": {
|
||||
"TileMaps/main.tmj": {
|
||||
"scale": 0.33,
|
||||
"selectedLayer": 0,
|
||||
"viewCenter": {
|
||||
"x": -463.63636363636374,
|
||||
"y": 300
|
||||
}
|
||||
},
|
||||
"TileSets/IconSet.tsj": {
|
||||
"dynamicWrapping": true
|
||||
},
|
||||
"TileSets/TileSet 1.tsj": {
|
||||
"dynamicWrapping": false,
|
||||
"scaleInDock": 1
|
||||
},
|
||||
"TileSets/TilesetNature.tsj": {
|
||||
"scaleInDock": 1.5
|
||||
},
|
||||
"TileSets/tileset 1 collision.tsj": {
|
||||
"dynamicWrapping": false,
|
||||
"scaleInDock": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2314,6 +2314,270 @@
|
|||
{
|
||||
"id":571,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":572,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":573,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":574,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":575,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":576,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":577,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":578,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":579,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":580,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":581,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":582,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":583,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":584,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":585,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":586,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":587,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":588,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":589,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":590,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":591,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":592,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":593,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":594,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":595,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":596,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":597,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":598,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":599,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":600,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":601,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":602,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":603,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":604,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":605,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":606,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":607,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":608,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":609,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":610,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":611,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":612,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":613,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":614,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":615,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":616,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":617,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":618,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":619,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":620,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":621,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":622,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":623,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":624,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":625,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":626,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":627,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":628,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":629,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":630,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":631,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":632,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":633,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":634,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":635,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":636,
|
||||
"type":"Tile"
|
||||
},
|
||||
{
|
||||
"id":637,
|
||||
"type":"Tile"
|
||||
}],
|
||||
"tilewidth":16,
|
||||
"type":"tileset",
|
||||
|
|
|
@ -27,16 +27,20 @@
|
|||
"duration":250,
|
||||
"tileid":3
|
||||
}],
|
||||
"id":0
|
||||
"id":0,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":1
|
||||
"id":1,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":2
|
||||
"id":2,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":3
|
||||
"id":3,
|
||||
"type":"StopObject"
|
||||
},
|
||||
{
|
||||
"id":4
|
||||
|
|
|
@ -166,12 +166,13 @@ namespace ZoFo.GameCore
|
|||
created_gameObject = new Player((update as UpdateGameObjectCreated).position);
|
||||
players.Add(created_gameObject as Player);
|
||||
myPlayer = players[0];
|
||||
gameObjects.Add(created_gameObject);
|
||||
gameObjects.Add(created_gameObject);
|
||||
(created_gameObject as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||
}
|
||||
else if((update as UpdateGameObjectCreated).GameObjectType == "Ammo")
|
||||
else if ((update as UpdateGameObjectCreated).GameObjectType == "Ammo")
|
||||
gameObjects.Add(new Ammo((update as UpdateGameObjectCreated).position));
|
||||
else if((update as UpdateGameObjectCreated).GameObjectType == "Zombie")
|
||||
gameObjects.Add(new Zombie((update as UpdateGameObjectCreated).position));
|
||||
else if ((update as UpdateGameObjectCreated).GameObjectType == "BottleOfWater")
|
||||
gameObjects.Add(new BottleOfWater((update as UpdateGameObjectCreated).position));
|
||||
else
|
||||
{
|
||||
Type t = Type.GetType("ZoFo.GameCore.GameObjects." + (update as UpdateGameObjectCreated).GameObjectType);
|
||||
|
@ -180,7 +181,7 @@ namespace ZoFo.GameCore
|
|||
(gameObject as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||
gameObjects.Add(gameObject);
|
||||
}
|
||||
(gameObjects.Last() as Entity).SetIdByClient((update as UpdateGameObjectCreated).IdEntity);
|
||||
|
||||
|
||||
}
|
||||
else if (update is UpdatePosition)
|
||||
|
|
|
@ -20,8 +20,8 @@ namespace ZoFo.GameCore.GameManagers.MapManager
|
|||
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." }
|
||||
{ "Collectables", "ZoFo.GameCore.GameObjects." },
|
||||
{ "Enemies", "ZoFo.GameCore.GameObjects." }
|
||||
};
|
||||
|
||||
//private static readonly float _scale = 1.0f;
|
||||
|
|
|
@ -10,14 +10,15 @@ using ZoFo.GameCore.GameManagers.CollisionManager;
|
|||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.GameManagers;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
namespace ZoFo.GameCore.GameObjects
|
||||
{
|
||||
public class BottleOfWater : Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "BottleOfWater");
|
||||
public BottleOfWater(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
using ZoFo.GameCore.GameManagers;
|
||||
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
namespace ZoFo.GameCore.GameObjects
|
||||
{
|
||||
public class Peeble:Collectable
|
||||
{
|
||||
|
@ -18,7 +18,8 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
|||
|
||||
public Peeble(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
namespace ZoFo.GameCore.GameObjects
|
||||
{
|
||||
class PureBottleOfWater:Collectable
|
||||
{
|
||||
|
@ -17,6 +17,8 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
|||
|
||||
public PureBottleOfWater(Vector2 position) : base(position)
|
||||
{
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
|
@ -9,14 +9,15 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
namespace ZoFo.GameCore.GameObjects
|
||||
{
|
||||
class RottenFlesh:Collectable
|
||||
{
|
||||
public override StaticGraphicsComponent graphicsComponent { get; } = new(_path + "RottenFlesh");
|
||||
public RottenFlesh(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
|||
using ZoFo.GameCore.GameManagers;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
||||
namespace ZoFo.GameCore.GameObjects
|
||||
{
|
||||
class Steel:Collectable
|
||||
{
|
||||
|
@ -17,6 +17,8 @@ namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables
|
|||
|
||||
public Steel(Vector2 position) : base(position)
|
||||
{
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ using ZoFo.GameCore.GameManagers.CollisionManager;
|
|||
using ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient;
|
||||
using ZoFo.GameCore.Graphics;
|
||||
|
||||
namespace ZoFo.GameCore.GameObjects.Entities.Interactables.Collectables;
|
||||
namespace ZoFo.GameCore.GameObjects;
|
||||
|
||||
public class Wood : Collectable
|
||||
{
|
||||
|
@ -13,7 +13,8 @@ public class Wood : Collectable
|
|||
|
||||
public Wood(Vector2 position) : base(position)
|
||||
{
|
||||
|
||||
graphicsComponent.ObjectDrawRectangle.Width = 20;
|
||||
graphicsComponent.ObjectDrawRectangle.Height = 20;
|
||||
}
|
||||
public override void OnInteraction(GameObject sender)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue