Fixes
This commit is contained in:
parent
2de1a409fb
commit
6fb9145c67
3 changed files with 5 additions and 3 deletions
|
@ -18,8 +18,8 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities.Monsters
|
||||||
bool isAttaking = false;
|
bool isAttaking = false;
|
||||||
public Zombie(Vector2 position) : base(position)
|
public Zombie(Vector2 position) : base(position)
|
||||||
{
|
{
|
||||||
Width = 72;
|
Width = 24;
|
||||||
Height = 120;
|
Height = 40;
|
||||||
monster_speed = 3;
|
monster_speed = 3;
|
||||||
name = "Zombie";
|
name = "Zombie";
|
||||||
leftBorder = (int)position.X - 60;
|
leftBorder = (int)position.X - 60;
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace DangerousD.GameCore
|
||||||
mapObjects = new List<MapObject>();
|
mapObjects = new List<MapObject>();
|
||||||
entities = new List<Entity>();
|
entities = new List<Entity>();
|
||||||
players = new List<Player>();
|
players = new List<Player>();
|
||||||
mapManager = new MapManager(2);
|
mapManager = new MapManager(1);
|
||||||
physicsManager = new PhysicsManager();
|
physicsManager = new PhysicsManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,8 @@ namespace DangerousD.GameCore.Managers
|
||||||
Type type = Type.GetType($"DangerousD.GameCore.GameObjects.{entityType}");
|
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);
|
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.SetPosition(new Vector2(inst.Pos.X, inst.Pos.Y - inst.Height));
|
||||||
|
inst.Height *= _scale;
|
||||||
|
inst.Width *= _scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue