diff --git a/DepthsBelow/DepthsBelow/Core.cs b/DepthsBelow/DepthsBelow/Core.cs index 74ba832..caa8e72 100755 --- a/DepthsBelow/DepthsBelow/Core.cs +++ b/DepthsBelow/DepthsBelow/Core.cs @@ -108,16 +108,21 @@ namespace DepthsBelow // Load map objects Map.ParseObjects(this); - Squad[0].Name = "Dean H. Jones"; - Squad[1].Name = "Walter L. Verville"; - Squad[2].Name = "Patrick Y. Southerland"; - Squad[3].Name = "Andrew C. Friend"; - Squad[4].Name = "Gary B. Whitley"; + Squad[0].Name = "Dean H. Jones"; + Squad[0].Transform.World.Rotation = -MathHelper.PiOver2; + Squad[1].Name = "Walter L. Verville"; + Squad[1].Transform.World.Rotation = -MathHelper.PiOver2; + Squad[2].Name = "Patrick Y. Southerland"; + Squad[2].Transform.World.Rotation = -MathHelper.PiOver2; + Squad[3].Name = "Andrew C. Friend"; + Squad[3].Transform.World.Rotation = -MathHelper.PiOver2; + Squad[4].Name = "Gary B. Whitley"; + Squad[4].Transform.World.Rotation = -MathHelper.PiOver2; // Center the camera on a unit Camera.Position = Squad[0].Transform.World.Position * -1 + new Vector2(GraphicsDevice.Viewport.Width / 2, GraphicsDevice.Viewport.Height / 2); - GroupManager = new DynamicGroupManager(Squad.Cast().ToList(), (float)Grid.TileSize * 1.5f); + GroupManager = new DynamicGroupManager(Squad.Cast().ToList(), (float)Grid.TileSize * 3.5f); Interface.CreateUnitFrames(Squad); diff --git a/DepthsBelow/DepthsBelow/DynamicGroupManager.cs b/DepthsBelow/DepthsBelow/DynamicGroupManager.cs index acc1c77..dd4ee00 100755 --- a/DepthsBelow/DepthsBelow/DynamicGroupManager.cs +++ b/DepthsBelow/DepthsBelow/DynamicGroupManager.cs @@ -20,7 +20,7 @@ namespace DepthsBelow foreach (var entity in Entities) { var stats = entity.GetComponent(); - if (stats != null) + if (stats != null && stats.Life > 0) maxPanic += stats.MaxPanic; } return maxPanic; @@ -68,12 +68,16 @@ namespace DepthsBelow if (oldGroup != null) { - newGroup.Panic += (oldGroup.Panic / oldGroup.MaxPanic) * (float)entity.GetComponent().MaxPanic; - oldGroup.Panic -= (oldGroup.Panic / oldGroup.MaxPanic) * (float)entity.GetComponent().MaxPanic; - oldGroup.Entities.Remove(entity); + if (entity.GetComponent().Life > 0) + { + newGroup.Panic += (oldGroup.Panic/oldGroup.MaxPanic)*(float) entity.GetComponent().MaxPanic; + //if (entity.GetComponent().Life > 0) + oldGroup.Panic -= (oldGroup.Panic/oldGroup.MaxPanic)*(float) entity.GetComponent().MaxPanic; + oldGroup.Entities.Remove(entity); + } } else - newGroup.Panic = 10; + newGroup.Panic = 125; } } diff --git a/DepthsBelow/DepthsBelow/Interface.cs b/DepthsBelow/DepthsBelow/Interface.cs index a4f0ab1..f7ece30 100755 --- a/DepthsBelow/DepthsBelow/Interface.cs +++ b/DepthsBelow/DepthsBelow/Interface.cs @@ -564,7 +564,7 @@ namespace DepthsBelow var pFrameBar = (GUI.Frame)pFrame["panicBar"]; var pFrameText = (GUI.Text)pFrame["text"]; pFrameBar.Width = (int)(pFrameBarBg.Width * (group.Panic / group.MaxPanic)); - pFrameText.Value = Math.Round(group.Panic).ToString() + " (" + Math.Round(group.Panic / group.MaxPanic * 100f).ToString() + "%)"; + pFrameText.Value = Math.Round(group.Panic).ToString() + "/" + group.MaxPanic.ToString() + " (" + Math.Round(group.Panic / group.MaxPanic * 100f).ToString() + "%)"; pFrame.Visible = true; if (lastFrame != null) diff --git a/DepthsBelow/DepthsBelow/KeyboardInput.cs b/DepthsBelow/DepthsBelow/KeyboardInput.cs index 166da91..7bd25ef 100755 --- a/DepthsBelow/DepthsBelow/KeyboardInput.cs +++ b/DepthsBelow/DepthsBelow/KeyboardInput.cs @@ -220,7 +220,10 @@ namespace DepthsBelow { try { - EntityManager.GetEntities()[1].Toggle(); + var pos = core.GroupManager.Groups[1].Entities[0].Transform.World.Position; + var enemy = new SmallEnemy(ref core.Swarm); + enemy.Transform.World.Position = pos + new Vector2(0, Grid.TileSize*3); + core.Swarm.Add(enemy); } catch {