diff --git a/DangerousD/Content/lvl.tmx b/DangerousD/Content/lvl.tmx index b26fa01..df88666 100644 --- a/DangerousD/Content/lvl.tmx +++ b/DangerousD/Content/lvl.tmx @@ -1,8 +1,13 @@ - - - - + + + + + + + + + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -32,13 +37,13 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,272,0,272,0,0,0,0,0,0,0,0,0,0, 52,52,52,52,0,52,52,52,52,52,52,52,52,52,52,52, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +272,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -136,13 +141,13 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,272,0,0,0,0,0,272,0,0,0,0,0,0,0,0, 52,52,0,0,0,0,0,52,52,52,52,52,52,52,52,52, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,272,0,0,0,0,0,0,0,0,0,0,0,0,0, 52,52,52,0,0,0,52,52,52,52,52,52,52,52,52,52, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -414,13 +419,13 @@ 29,29,29,29,0,0,157,157,167,157,157,157,157,157,260,157, 29,29,29,29,0,0,157,157,180,157,254,255,157,157,260,157, 29,29,29,29,0,0,157,157,193,157,267,268,157,157,260,157, -29,29,29,29,0,0,204,204,204,204,280,281,204,272,260,272, +29,29,29,29,0,0,204,204,204,204,280,281,204,0,260,0, 29,29,29,29,0,0,147,199,148,0,0,0,0,0,260,0, 29,29,29,29,0,0,147,199,148,144,144,144,144,144,260,144, 29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157, 29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157, 29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157, -29,29,29,29,0,0,147,199,148,204,272,157,157,157,260,157, +29,29,29,29,0,0,147,199,148,204,0,157,157,157,260,157, 29,29,29,29,0,0,147,199,148,0,0,157,157,157,260,157, 29,29,29,29,0,0,147,199,148,144,144,157,157,157,260,157, 29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157, @@ -438,7 +443,7 @@ 157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157, 157,157,157,157,157,157,258,157,157,157,149,152,157,157,157,157, 157,157,157,157,157,157,271,157,157,157,150,153,157,696,697,157, -157,157,272,204,204,204,284,204,204,204,151,154,204,709,710,204, +157,157,0,204,204,204,284,204,204,204,151,154,204,709,710,204, 157,157,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 157,157,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,157,157,157,157,157,157,157,157,157,167,157,157,209,210, @@ -500,13 +505,13 @@ 29,29,29,29,0,0,147,199,148,157,157,157,157,157,260,157, -29,29,29,29,0,0,160,200,161,204,204,272,157,157,260,157, +29,29,29,29,0,0,160,200,161,204,204,0,157,157,260,157, 29,29,29,29,0,0,0,0,0,0,0,0,157,157,260,157, 29,29,29,29,0,0,144,144,144,144,144,144,157,157,260,157, 29,29,29,29,0,0,157,167,157,157,157,157,157,157,260,157, 29,29,29,29,0,0,157,180,157,149,152,157,157,157,260,157, 29,29,29,29,0,0,157,193,157,150,153,157,157,157,260,157, -6,29,29,29,0,0,204,204,204,151,154,204,272,157,260,157, +6,29,29,29,0,0,204,204,204,151,154,204,0,157,260,157, 29,29,29,29,0,0,0,0,0,0,0,0,0,157,260,157, 29,29,29,29,0,0,144,144,144,144,144,144,144,157,260,157, 29,29,29,29,0,0,157,157,157,157,157,157,157,219,220,221, @@ -518,7 +523,7 @@ 157,157,157,157,267,268,157,696,697,157,157,193,157,157,235,236, -157,272,204,204,280,281,204,709,710,204,204,204,204,204,204,204, +157,0,204,204,280,281,204,709,710,204,204,204,204,204,204,204, 157,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 157,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144, 157,157,157,178,179,157,157,157,157,157,157,157,157,157,157,157, diff --git a/DangerousD/GameCore/Managers/MapManager.cs b/DangerousD/GameCore/Managers/MapManager.cs index d45d53d..9087d97 100644 --- a/DangerousD/GameCore/Managers/MapManager.cs +++ b/DangerousD/GameCore/Managers/MapManager.cs @@ -108,8 +108,8 @@ namespace DangerousD.GameCore.Managers } else if (type.Equals(typeof(Door))) { - int gid = entity.Attributes["type"] is not null ? int.Parse(entity.Attributes["type"].Value) : 0; - inst = (Entity)Activator.CreateInstance(type, pos, new Vector2(32, 48), new Rectangle(0, 0, 32, 48)); + int gid = entity.Attributes["gid"] is not null ? int.Parse(entity.Attributes["gid"].Value) : 0; + inst = (Entity)Activator.CreateInstance(type, pos, new Vector2(32, 48), new Rectangle((gid - 872)*32, 0, 32, 48)); } else {