Main map convert to new format
This commit is contained in:
parent
b9f0740c17
commit
9c9b2b035e
5 changed files with 15 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="left-up" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="11" nextobjectid="49">
|
||||
<tileset firstgid="1" source="map.tsx"/>
|
||||
<layer id="1" name="Collision" class="StopTile" width="30" height="20" offsetx="-352.033" offsety="192.098">
|
||||
<layer id="1" name="Collision" class="StopTile" width="30" height="20" visible="0" offsetx="-352.033" offsety="192.098">
|
||||
<data encoding="csv">
|
||||
<chunk x="0" y="-16" width="16" height="16">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -311,7 +311,7 @@
|
|||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="4" name="Background 2" class="Tile" width="30" height="20" locked="1">
|
||||
<layer id="4" name="Background 2" class="Tile" width="30" height="20" visible="0" locked="1">
|
||||
<data encoding="csv">
|
||||
<chunk x="0" y="0" width="16" height="16">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -441,7 +441,7 @@
|
|||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="6" name="Ladders" class="Platform" width="30" height="20" locked="1">
|
||||
<layer id="6" name="Ladders" class="Platform" width="30" height="20" visible="0" locked="1">
|
||||
<data encoding="csv">
|
||||
<chunk x="-16" y="0" width="16" height="16">
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -517,7 +517,7 @@
|
|||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<layer id="3" name="Backgrond" class="Tile" width="30" height="20" locked="1" offsetx="-256.033" offsety="256.098">
|
||||
<layer id="3" name="Backgrond" class="Tile" width="30" height="20" visible="0" locked="1" offsetx="-256.033" offsety="256.098">
|
||||
<data encoding="csv">
|
||||
<chunk x="-16" y="-16" width="16" height="16">
|
||||
29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
|
||||
|
@ -701,7 +701,7 @@
|
|||
</chunk>
|
||||
</data>
|
||||
</layer>
|
||||
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie" locked="1">
|
||||
<objectgroup id="8" name="Zombies" class="LivingEntities.Monsters.Zombie" visible="0">
|
||||
<object id="26" x="265" y="469.5">
|
||||
<point/>
|
||||
</object>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using DangerousD.GameCore.Graphics;
|
||||
using DangerousD.GameCore.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
|
|
@ -25,10 +25,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
public int leftBorder;
|
||||
public bool isVisible = true;
|
||||
private bool isAttacked = false;
|
||||
public bool isInvincible;
|
||||
public bool isInvincible = false;
|
||||
public GameObject objectAttack;
|
||||
|
||||
public Player(Vector2 position, bool isInvincible = false) : base(position)
|
||||
public Player(Vector2 position) : base(position)
|
||||
{
|
||||
Width = 16;
|
||||
Height = 32;
|
||||
|
@ -41,8 +41,11 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
velocity = new Vector2(0, 0);
|
||||
rightBorder = (int)position.X + 100;
|
||||
leftBorder = (int)position.X - 100;
|
||||
this.isInvincible = isInvincible;
|
||||
}
|
||||
|
||||
public Player(Vector2 position, bool isInvincible = false) : this(position)
|
||||
{
|
||||
this.isInvincible = isInvincible;
|
||||
}
|
||||
|
||||
public bool IsAlive { get { return isAlive; } }
|
||||
|
@ -127,7 +130,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
if (GraphicsComponent.GetCurrentAnimation != "playerMoveLeft")
|
||||
{
|
||||
GraphicsComponent.StartAnimation("playerMoveLeft");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(AppManager.Instance.InputManager.VectorMovementDirection.X == 0)//стоит
|
||||
{
|
||||
|
|
|
@ -202,7 +202,7 @@ namespace DangerousD.GameCore
|
|||
case GameState.Lobby:
|
||||
break;
|
||||
case GameState.Game:
|
||||
GameManager.mapManager.LoadLevel("debug");
|
||||
GameManager.mapManager.LoadLevel("lvl");
|
||||
break;
|
||||
case GameState.Death:
|
||||
break;
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace DangerousD.GameCore.Managers
|
|||
new Vector2(float.Parse(entity.Attributes["x"].Value, CultureInfo.InvariantCulture) + offsetX,
|
||||
float.Parse(entity.Attributes["y"].Value, CultureInfo.InvariantCulture) + offsetY) * _scale;
|
||||
Entity inst;
|
||||
if (type.Equals(typeof(Player)) && entity.Attributes["name"].Value == "DEBUGUS")
|
||||
if (type.Equals(typeof(Player)) && entity.Attributes["name"] is not null && entity.Attributes["name"].Value == "DEBUGUS")
|
||||
{
|
||||
inst = (Entity)Activator.CreateInstance(type, pos, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue