diff --git a/DangerousD/Content/Content.mgcb b/DangerousD/Content/Content.mgcb
index 0ea387f..6729fe5 100644
--- a/DangerousD/Content/Content.mgcb
+++ b/DangerousD/Content/Content.mgcb
@@ -10,6 +10,7 @@
#-------------------------------- References --------------------------------#
+/reference:references/MonoGame.Extended.Content.Pipeline.dll
#---------------------------------- Content ---------------------------------#
@@ -83,6 +84,19 @@
/processorParam:TextureFormat=Color
/build:menuFon.jpg
+#begin MonstersAnimations.png
+#begin menuFon.jpg
+/importer:TextureImporter
+/processor:TextureProcessor
+/processorParam:ColorKeyColor=255,0,255,255
+/processorParam:ColorKeyEnabled=True
+/processorParam:GenerateMipmaps=False
+/processorParam:PremultiplyAlpha=True
+/processorParam:ResizeToPowerOfTwo=False
+/processorParam:MakeSquare=False
+/processorParam:TextureFormat=Color
+/build:menuFon.jpg
+
#begin MenuFon2.jpg
/importer:TextureImporter
/processor:TextureProcessor
@@ -107,7 +121,7 @@
/processorParam:TextureFormat=Color
/build:menuFon3.jpg
-#begin PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png
+#begin tiles.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
@@ -117,7 +131,7 @@
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
-/build:PC_Computer_Dangerous_Dave_In_The_Haunted_Mansion_Death_Sequences.png
+/build:tiles.png
#begin wall.jpg
/importer:TextureImporter
diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx
new file mode 100644
index 0000000..8b3a0c2
--- /dev/null
+++ b/DangerousD/Content/lvl.tmx
@@ -0,0 +1,754 @@
+
+
diff --git a/DangerousD/Content/map.tsx b/DangerousD/Content/map.tsx
new file mode 100644
index 0000000..288bb53
--- /dev/null
+++ b/DangerousD/Content/map.tsx
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/DangerousD/Content/tiles.png b/DangerousD/Content/tiles.png
new file mode 100644
index 0000000..3e35587
Binary files /dev/null and b/DangerousD/Content/tiles.png differ
diff --git a/DangerousD/Desktop/DangerousD map/map_0.mgcontent b/DangerousD/Desktop/DangerousD map/map_0.mgcontent
new file mode 100644
index 0000000..acc2649
--- /dev/null
+++ b/DangerousD/Desktop/DangerousD map/map_0.mgcontent
@@ -0,0 +1,16 @@
+
+
+ C:/Users/Semejkin_AV/Desktop/DangerousD map/map.tsx
+ 2023-08-16T13:04:13.796245+03:00
+ C:/Users/Semejkin_AV/Documents/Github_repos/DangerousD/DangerousD/Content/bin/DesktopGL/Content/../../../../../Desktop/DangerousD map/map_0.xnb
+ 2023-08-16T15:38:41.8125207+03:00
+ TiledMapTilesetImporter
+ 2023-07-14T20:14:40+03:00
+ TiledMapTilesetProcessor
+ 2023-07-14T20:14:40+03:00
+
+
+ C:/Users/Semejkin_AV/Documents/Github_repos/DangerousD/DangerousD/Content/bin/DesktopGL/Content/../../../../../Desktop/DangerousD map/tiles_0.xnb
+
+
+
\ No newline at end of file
diff --git a/DangerousD/Desktop/DangerousD map/tiles_0.mgcontent b/DangerousD/Desktop/DangerousD map/tiles_0.mgcontent
new file mode 100644
index 0000000..4cfff75
--- /dev/null
+++ b/DangerousD/Desktop/DangerousD map/tiles_0.mgcontent
@@ -0,0 +1,22 @@
+
+
+ C:/Users/Semejkin_AV/Desktop/DangerousD map/tiles.BMP
+ 2023-08-16T12:47:16.3453923+03:00
+ C:/Users/Semejkin_AV/Documents/Github_repos/DangerousD/DangerousD/Content/bin/DesktopGL/Content/../../../../../Desktop/DangerousD map/tiles_0.xnb
+ 2023-08-16T15:38:41.7865192+03:00
+ TextureImporter
+ 2022-07-26T14:44:56+03:00
+ TextureProcessor
+ 2022-07-26T14:44:56+03:00
+
+ ColorKeyColor
+ 0,0,0,0
+
+
+ ColorKeyEnabled
+ True
+
+
+
+
+
\ No newline at end of file
diff --git a/DangerousD/GameCore/GUI/AbstractGui.cs b/DangerousD/GameCore/GUI/AbstractGui.cs
index 24af331..7f7b212 100644
--- a/DangerousD/GameCore/GUI/AbstractGui.cs
+++ b/DangerousD/GameCore/GUI/AbstractGui.cs
@@ -17,9 +17,9 @@ public abstract class AbstractGui : IDrawableObject
protected abstract void CreateUI();
private GraphicsDevice graphicsDevice;
- public virtual void Initialize(GraphicsDevice graphicsDevice)
+ public virtual void Initialize()
{
- Manager.Initialize(graphicsDevice);
+ Manager.Initialize(AppManager.Instance.GraphicsDevice);
this.graphicsDevice = graphicsDevice;
CreateUI();
}
diff --git a/DangerousD/GameCore/GameObjects/Entity.cs b/DangerousD/GameCore/GameObjects/Entity.cs
index cf2caa9..8876e2c 100644
--- a/DangerousD/GameCore/GameObjects/Entity.cs
+++ b/DangerousD/GameCore/GameObjects/Entity.cs
@@ -7,12 +7,9 @@ using Microsoft.Xna.Framework.Graphics;
namespace DangerousD.GameCore.GameObjects
{
public abstract class Entity : GameObject
- {
-
-
+ {
public Entity(Vector2 position) : base(position) {}
-
+ public virtual void SetPosition(Vector2 position) { _pos = position; }
-
}
}
diff --git a/DangerousD/GameCore/GameObjects/GameObject.cs b/DangerousD/GameCore/GameObjects/GameObject.cs
index c354e3e..ae5cd2c 100644
--- a/DangerousD/GameCore/GameObjects/GameObject.cs
+++ b/DangerousD/GameCore/GameObjects/GameObject.cs
@@ -22,10 +22,12 @@ namespace DangerousD.GameCore
protected abstract GraphicsComponent GraphicsComponent { get; }
public GameObject(Vector2 pos)
{
+ Initialize();
_pos = pos;
Width = 500;
Height = 101;
//Animator = new GraphicsComponent(new() { "playerIdle" });
+
LoadContent();
AppManager.Instance.GameManager.Register(this);
}
@@ -34,7 +36,7 @@ namespace DangerousD.GameCore
{
}
- public virtual void Initialize(GraphicsDevice graphicsDevice)
+ public virtual void Initialize()
{
}
diff --git a/DangerousD/GameCore/GameObjects/IDrawableObject.cs b/DangerousD/GameCore/GameObjects/IDrawableObject.cs
index f157dcb..1d9ca5c 100644
--- a/DangerousD/GameCore/GameObjects/IDrawableObject.cs
+++ b/DangerousD/GameCore/GameObjects/IDrawableObject.cs
@@ -6,7 +6,7 @@ namespace DangerousD.GameCore.GUI
{
interface IDrawableObject
{
- void Initialize(GraphicsDevice graphicsDevice);
+ void Initialize();
void LoadContent();
void Update(GameTime gameTime);
void Draw(SpriteBatch spriteBatch);
diff --git a/DangerousD/GameCore/GameObjects/LivingEntity.cs b/DangerousD/GameCore/GameObjects/LivingEntity.cs
index 5c18831..8341080 100644
--- a/DangerousD/GameCore/GameObjects/LivingEntity.cs
+++ b/DangerousD/GameCore/GameObjects/LivingEntity.cs
@@ -11,7 +11,11 @@ public abstract class LivingEntity : Entity
{
acceleration = new Vector2(0, 30);
}
- public void SetPosition(Vector2 position) { targetPosition = position; _pos = position; } //TODO befrend targetpos and physics engine
+ public override void SetPosition(Vector2 position)
+ {
+ targetPosition = position; _pos = position;
+
+ } //TODO befrend targetpos and physics engine
public override void Update(GameTime gameTime)
{
diff --git a/DangerousD/GameCore/GameObjects/MapObject.cs b/DangerousD/GameCore/GameObjects/MapObject.cs
index d4180d0..24add79 100644
--- a/DangerousD/GameCore/GameObjects/MapObject.cs
+++ b/DangerousD/GameCore/GameObjects/MapObject.cs
@@ -1,13 +1,29 @@
-using Microsoft.Xna.Framework;
+using System.Collections.Generic;
+using Microsoft.Xna.Framework;
using System.Security.Cryptography.X509Certificates;
-
+using DangerousD.GameCore.Graphics;
+using Microsoft.Xna.Framework.Graphics;
namespace DangerousD.GameCore.GameObjects;
public abstract class MapObject : GameObject
{
public bool IsColliderOn;
- public MapObject(Vector2 position) : base(position)
+ private Rectangle _sourceRectangle;
+ protected override GraphicsComponent GraphicsComponent { get; } = new("tiles");
+ public MapObject(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position)
+ {
+ _sourceRectangle = sourceRectangle;
+ Width = (int)size.X;
+ Height = (int)size.Y;
+ }
+
+ public override void Initialize()
{
}
+
+ public void Draw(SpriteBatch spriteBatch)
+ {
+ GraphicsComponent.DrawAnimation(Rectangle, spriteBatch, _sourceRectangle);
+ }
}
\ No newline at end of file
diff --git a/DangerousD/GameCore/GameObjects/MapObjects/GrassBlock.cs b/DangerousD/GameCore/GameObjects/MapObjects/GrassBlock.cs
deleted file mode 100644
index 3ada6f5..0000000
--- a/DangerousD/GameCore/GameObjects/MapObjects/GrassBlock.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Graphics;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using DangerousD.GameCore.Graphics;
-
-namespace DangerousD.GameCore.GameObjects.MapObjects
-{
- internal class GrassBlock : MapObject
- {
- protected override GraphicsComponent GraphicsComponent { get; } = new("wall");
-
- public GrassBlock(Vector2 position) : base(position)
- {
- Width = 32;
- Height = 32;
- }
- }
-}
diff --git a/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs b/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs
new file mode 100644
index 0000000..f3648f9
--- /dev/null
+++ b/DangerousD/GameCore/GameObjects/MapObjects/Platform.cs
@@ -0,0 +1,12 @@
+using DangerousD.GameCore.Graphics;
+using Microsoft.Xna.Framework;
+
+namespace DangerousD.GameCore.GameObjects.MapObjects;
+
+public class Platform : MapObject
+{
+ public Platform(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
+ {
+ IsColliderOn = true;
+ }
+}
\ No newline at end of file
diff --git a/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs b/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs
new file mode 100644
index 0000000..096973b
--- /dev/null
+++ b/DangerousD/GameCore/GameObjects/MapObjects/StopTile.cs
@@ -0,0 +1,12 @@
+using DangerousD.GameCore.Graphics;
+using Microsoft.Xna.Framework;
+
+namespace DangerousD.GameCore.GameObjects.MapObjects;
+
+public class StopTile : MapObject
+{
+ public StopTile(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
+ {
+ IsColliderOn = true;
+ }
+}
\ No newline at end of file
diff --git a/DangerousD/GameCore/GameObjects/MapObjects/TestAnimationDeath.cs b/DangerousD/GameCore/GameObjects/MapObjects/TestAnimationDeath.cs
deleted file mode 100644
index 8e9be4d..0000000
--- a/DangerousD/GameCore/GameObjects/MapObjects/TestAnimationDeath.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using DangerousD.GameCore.Graphics;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DangerousD.GameCore.GameObjects.MapObjects
-{
- internal class TestAnimationDeath : Entity
- {
- protected override GraphicsComponent GraphicsComponent { get; } = new(new List { "death1", "deathbear" },"death1");
-
- public TestAnimationDeath(Vector2 position) : base(position)
- {
- Width =512;
- Height = 512;
-
- GraphicsComponent.StartAnimation("deathbear");
-
- }
- }
-}
diff --git a/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs b/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs
new file mode 100644
index 0000000..2b11dda
--- /dev/null
+++ b/DangerousD/GameCore/GameObjects/MapObjects/Tile.cs
@@ -0,0 +1,12 @@
+using DangerousD.GameCore.Graphics;
+using Microsoft.Xna.Framework;
+
+namespace DangerousD.GameCore.GameObjects.MapObjects;
+
+public class Tile : MapObject
+{
+ public Tile(Vector2 position, Vector2 size, Rectangle sourceRectangle) : base(position, size, sourceRectangle)
+ {
+ IsColliderOn = false;
+ }
+}
\ No newline at end of file
diff --git a/DangerousD/GameCore/Levels/ILevel.cs b/DangerousD/GameCore/Levels/ILevel.cs
deleted file mode 100644
index 7fbec35..0000000
--- a/DangerousD/GameCore/Levels/ILevel.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace DangerousD.GameCore.Levels
-{
- interface ILevel
- {
- void InitLevel();
- }
-}
diff --git a/DangerousD/GameCore/Levels/Level1.cs b/DangerousD/GameCore/Levels/Level1.cs
deleted file mode 100644
index 64598f8..0000000
--- a/DangerousD/GameCore/Levels/Level1.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using DangerousD.GameCore.GameObjects.LivingEntities;
-using DangerousD.GameCore.GameObjects.MapObjects;
-using Microsoft.Xna.Framework;
-using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
-using System.Collections.Generic;
-using DangerousD.GameCore.GameObjects.Entities;
-
-namespace DangerousD.GameCore.Levels
-{
- public class Level1 : ILevel
- {
- public void InitLevel()
- {
- new Player(new Vector2(0,0));
-
- var Spider = new Spider(new Vector2(112, 0));
- var FlameSkull = new FlameSkull(new Vector2(512, 0));
- var Werewolf = new Werewolf(new Vector2(640, 0));
- var Ghost = new Ghost(new Vector2(730, 0));
- var Frank = new Frank(new Vector2(100, 64));
- var FrankBalls = new FrankBalls(new Vector2(Frank.Pos.X, Frank.Pos.Y));
- var Zombie = new Zombie(new Vector2(300, 64));
- var SilasBall = new SilasBall(new Vector2(550, 64));
- var SilasHand = new SilasHands(new Vector2(200,64));
- var SilasMaster = new SilasMaster(new Vector2(400, 300));
- new GrassBlock(new Vector2(0, 224));
- for (int i = 0; i < 50; i++)
- {
- new GrassBlock(new Vector2(i*32, 256));
- }
- new GrassBlock(new Vector2(500, 224));
- Player player = new Player(new Vector2(400, 64));
- player.AnimationJump();
-
- //new GrassBlock(new Vector2(500, 224));
- }
- }
-}
diff --git a/DangerousD/GameCore/Managers/AppManager.cs b/DangerousD/GameCore/Managers/AppManager.cs
index 0fb9954..f800998 100644
--- a/DangerousD/GameCore/Managers/AppManager.cs
+++ b/DangerousD/GameCore/Managers/AppManager.cs
@@ -31,7 +31,7 @@ namespace DangerousD.GameCore
public Point inGameResolution = new Point(800, 480);
private RenderTarget2D renderTarget;
- public GameManager GameManager { get; private set; } = new GameManager();
+ public GameManager GameManager { get; private set; } = new();
public AnimationBuilder AnimationBuilder { get; private set; } = new AnimationBuilder();
public NetworkManager NetworkManager { get; private set; } = new NetworkManager();
public InputManager InputManager { get; private set; } = new InputManager();
@@ -39,9 +39,9 @@ namespace DangerousD.GameCore
public SettingsManager SettingsManager { get; private set; } = new SettingsManager();
public AppManager()
{
+ Content.RootDirectory = "Content";
Instance = this;
_graphics = new GraphicsDeviceManager(this);
- Content.RootDirectory = "Content";
IsMouseVisible = true;
TargetElapsedTime = TimeSpan.FromMilliseconds(1000 / 30);
@@ -64,10 +64,11 @@ namespace DangerousD.GameCore
protected override void Initialize()
{
+ GameManager.Initialize();
AnimationBuilder.LoadAnimations();
- MenuGUI.Initialize(GraphicsDevice);
- LoginGUI.Initialize(GraphicsDevice);
- LobbyGUI.Initialize(GraphicsDevice);
+ MenuGUI.Initialize();
+ LoginGUI.Initialize();
+ LobbyGUI.Initialize();
base.Initialize();
}
@@ -165,7 +166,7 @@ namespace DangerousD.GameCore
case GameState.Lobby:
break;
case GameState.Game:
- GameManager.mapManager.LoadLevel("");
+ GameManager.mapManager.LoadLevel("lvl");
break;
case GameState.GameOver:
break;
diff --git a/DangerousD/GameCore/Managers/GameManager.cs b/DangerousD/GameCore/Managers/GameManager.cs
index 7c02936..f2ce8c8 100644
--- a/DangerousD/GameCore/Managers/GameManager.cs
+++ b/DangerousD/GameCore/Managers/GameManager.cs
@@ -7,6 +7,7 @@ using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Text;
+using DangerousD.GameCore.GameObjects.LivingEntities.Monsters;
namespace DangerousD.GameCore
{
@@ -16,6 +17,7 @@ namespace DangerousD.GameCore
public List livingEntities;
public List entities;
public List mapObjects;
+ public List others;
public MapManager mapManager;
public PhysicsManager physicsManager;
public List players;
@@ -23,14 +25,23 @@ namespace DangerousD.GameCore
public Player GetPlayer1 { get; private set; }
public GameManager()
{
+ others = new List();
GetAllGameObjects = new List();
livingEntities = new List();
mapObjects = new List();
entities = new List();
players = new List();
- mapManager = new MapManager();
+ mapManager = new MapManager(1);
physicsManager = new PhysicsManager();
- mapManager.Init();
+ }
+
+ public void Initialize()
+ {
+ //mapManager.LoadLevel("Level1");
+ }
+
+ public void LoadContent()
+ {
}
internal void Register(GameObject gameObject)
@@ -90,4 +101,4 @@ namespace DangerousD.GameCore
}
}
-}
\ No newline at end of file
+}
diff --git a/DangerousD/GameCore/Managers/MapManager.cs b/DangerousD/GameCore/Managers/MapManager.cs
index f5c9d28..36a0f6b 100644
--- a/DangerousD/GameCore/Managers/MapManager.cs
+++ b/DangerousD/GameCore/Managers/MapManager.cs
@@ -1,26 +1,115 @@
-using DangerousD.GameCore.GameObjects;
-using DangerousD.GameCore.Graphics;
-using DangerousD.GameCore.Levels;
-using System;
+using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
-using System.Net.Security;
-using System.Text;
-using System.Threading.Tasks;
+using System.Xml;
+using DangerousD.GameCore.GameObjects.MapObjects;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
+using System.Xml.Serialization;
+using DangerousD.GameCore.GameObjects;
namespace DangerousD.GameCore.Managers
{
public class MapManager
{
- ILevel Level;
- public void Init()
+ private int _columns;
+ private int _scale;
+
+ public MapManager(int scale)
{
- Level = new Level1();
+ _scale = scale;
}
+
//Level
public void LoadLevel(string level)
{
- Level.InitLevel();
+ LoadTilesData();
+
+ XmlDocument xml = new();
+ xml.Load($"../../../Content/{level}.tmx");
+ Vector2 tileSize = new(int.Parse(xml.DocumentElement.Attributes["tilewidth"].Value),
+ int.Parse(xml.DocumentElement.Attributes["tileheight"].Value));
+ //tileSize *= _scale;
+
+ foreach (XmlNode layer in xml.DocumentElement.SelectNodes("layer"))
+ {
+ InstantiateTiles(layer, tileSize);
+ }
+
+ foreach (XmlNode layer in xml.DocumentElement.SelectNodes("objectgroup"))
+ {
+ InstantiateEntities(layer);
+ }
+ }
+
+ private void InstantiateTiles(XmlNode layer, Vector2 tileSize)
+ {
+ string tileType = layer.Attributes["class"].Value;
+ float offsetX = layer.Attributes["offsetx"] is not null ? float.Parse(layer.Attributes["offsetx"].Value) : 0;
+ float offsetY = layer.Attributes["offsety"] is not null ? float.Parse(layer.Attributes["offsety"].Value) : 0;
+
+
+ Debug.Write(layer.SelectNodes("data/chunk").Count);
+ foreach (XmlNode chunk in layer.SelectNodes("data/chunk"))
+ {
+ int chunkW = int.Parse(chunk.Attributes["width"].Value);
+ int chunkX = int.Parse(chunk.Attributes["x"].Value);
+ int chunkY = int.Parse(chunk.Attributes["y"].Value);
+
+
+ List tiles = chunk.InnerText.Split(',').Select(int.Parse).ToList();
+ for (int i = 0; i < tiles.Count; i++)
+ {
+ if (tiles[i] != 0)
+ {
+ Vector2 pos = new(((chunkX+ i % chunkW) * tileSize.X + offsetX) * _scale,
+ ((chunkY + i / chunkW) * tileSize.Y + offsetY) * _scale);
+ //pos *= _scale;
+ Rectangle sourceRect = new(new Point((tiles[i] -1) % _columns, (tiles[i] -1) / _columns) * tileSize.ToPoint(), tileSize.ToPoint());
+ Type type = Type.GetType($"DangerousD.GameCore.GameObjects.MapObjects.{tileType}");
+ Activator.CreateInstance(type, pos, tileSize * _scale, sourceRect);
+
+ /*switch (tileType)
+ {
+ case "collidable":
+ new StopTile(pos, tileSize * _scale, sourceRect);
+ break;
+ case "platform":
+ new Platform(pos, tileSize * _scale, sourceRect);
+ break;
+ case "non_collidable":
+ new Tile(pos, tileSize * _scale, sourceRect);
+ break;
+ }*/
+ }
+
+ }
+ }
+ }
+
+ private void LoadTilesData()
+ {
+ XmlDocument xml = new();
+ xml.Load($"../../../Content/map.tsx");
+ XmlNode root = xml.DocumentElement;
+
+ _columns = int.Parse(root.Attributes["columns"].Value);
+ }
+
+ private void InstantiateEntities(XmlNode group)
+ {
+ string entityType = group.Attributes["class"].Value;
+ float offsetX = group.Attributes["offsetx"] is not null ? float.Parse(group.Attributes["offsetx"].Value) : 0;
+ float offsetY = group.Attributes["offsety"] is not null ? float.Parse(group.Attributes["offsety"].Value) : 0;
+ foreach (XmlNode entity in group.ChildNodes)
+ {
+ Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityType}");
+ Entity inst = (Entity)Activator.CreateInstance(type, new Vector2(float.Parse(entity.Attributes["x"].Value) + offsetX, float.Parse(entity.Attributes["y"].Value) + offsetY) * _scale);
+ inst.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height));
+ inst.Height *= _scale;
+ inst.Width *= _scale;
+ }
}
}
}
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 0000000..90dab50
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file