public ViewSoldierStatistics(Battle battle, BattleSoldier soldier) { this.battle = battle; AddControl(new Overlay(Overlays.SoldierStatistics, 4)); AddControl(new Label(4, Label.Center, $"{soldier.Rank} {soldier.Name}", Font.Large, ColorScheme.Green)); AddRow(31, "TIME UNITS", soldier.TimeUnits, soldier.MaxTimeUnits, 48); AddRow(41, "ENERGY", soldier.Energy, soldier.MaxEnergy, 144); AddRow(51, "HEALTH", soldier.Health, soldier.MaxHealth, 32); AddRow(61, "FATAL WOUNDS", soldier.TotalFatalWounds, soldier.TotalFatalWounds, 32); AddRow(71, "BRAVERY", soldier.Bravery, soldier.Soldier.Statistics.Bravery, 247, 249); AddRow(81, "MORALE", soldier.Morale, soldier.MaxMorale, 247, 249); AddRow(91, "REACTIONS", soldier.Reactions, soldier.Soldier.Statistics.Reactions, 96); AddRow(101, "FIRING ACCURACY", soldier.FiringAccuracy, soldier.Soldier.Statistics.FiringAccuracy, 128); AddRow(111, "THROWING ACCURACY", soldier.ThrowingAccuracy, soldier.Soldier.Statistics.ThrowingAccuracy, 160); AddRow(121, "STRENGTH", soldier.Strength, soldier.Soldier.Statistics.Strength, 147); if (soldier.Soldier.HasPsiSkill) { AddRow(131, "PSIONIC STRENGTH", soldier.PsionicStrength, soldier.Soldier.Statistics.PsionicStrength, 176); AddRow(141, "PSIONIC SKLIL", soldier.PsionicSkill, soldier.Soldier.Statistics.PsionicSkill, 176); } AddRow(151, "FRONT ARMOR", soldier.FrontArmor, soldier.Soldier.FrontArmor, 1); AddRow(161, "LEFT ARMOR", soldier.LeftArmor, soldier.Soldier.LeftArmor, 1); AddRow(171, "RIGHT ARMOR", soldier.RightArmor, soldier.Soldier.RightArmor, 1); AddRow(181, "REAR ARMOR", soldier.RearArmor, soldier.Soldier.RearArmor, 1); AddRow(191, "UNDER ARMOR", soldier.UnderArmor, soldier.Soldier.UnderArmor, 1); }
public Inventory(Battle battle, BattleSoldier soldier, List<BattleItem> ground, bool isInitialInventory) { this.battle = battle; this.soldier = soldier; this.ground = ground; this.isInitialInventory = isInitialInventory; CalculateGroundViews(); AddControl(new Overlay(Overlays.Tactical, 4)); AddControl(new ClickArea(1, 238, 35, 23, OnOk)); AddControl(new ClickArea(1, 274, 23, 23, OnPreviousSoldier)); AddControl(new ClickArea(1, 298, 23, 23, OnNextSoldier)); AddControl(new ClickArea(32, 288, 33, 26, OnUnloadWeapon)); AddControl(new ClickArea(137, 288, 33, 15, OnNextGroundView)); AddControl(new Label(0, 0, soldier.Soldier.Name, Font.Large, ColorScheme.Green)); AddControl(new Label(32, 16, "RIGHT SHOULDER", Font.Normal, ColorScheme.Green)); AddControl(new Label(32, 112, "LEFT SHOULDER", Font.Normal, ColorScheme.Green)); AddControl(new Label(56, 0, "RIGHT HAND", Font.Normal, ColorScheme.Green)); AddControl(new Label(56, 128, "LEFT HAND", Font.Normal, ColorScheme.Green)); AddControl(new Label(112, 0, "RIGHT LEG", Font.Normal, ColorScheme.Green)); AddControl(new Label(112, 128, "LEFT LEG", Font.Normal, ColorScheme.Green)); AddControl(new Label(32, 192, "BACK PACK", Font.Normal, ColorScheme.Green)); AddControl(new Label(96, 192, "BELT", Font.Normal, ColorScheme.Green)); AddControl(new Label(143, 0, "GROUND", Font.Normal, ColorScheme.Green)); AddControl(new ClickGridArea(40, 16, 2, 1, OnClickRightShoulder)); AddControl(new ClickGridArea(40, 112, 2, 1, OnClickLeftShoulder)); AddControl(new ClickArea(64, 0, 32, 48, OnClickRightHand)); AddControl(new ClickArea(64, 128, 32, 48, OnClickLeftHand)); AddControl(new ClickGridArea(120, 0, 2, 1, OnClickRightLeg)); AddControl(new ClickGridArea(120, 128, 2, 1, OnClickLeftLeg)); AddControl(new ClickGridArea(40, 192, 3, 3, OnClickBackPack)); AddControl(new ClickGridArea(104, 192, 4, 2, OnClickBelt)); AddControl(new ClickGridArea(152, 0, 20, 3, OnClickGround)); if (!isInitialInventory) { AddControl(new Label(24, 250, "TUs>", Font.Normal, ColorScheme.Green)); AddControl(new DynamicLabel(24, 270, () => $"{soldier.TimeUnits}", Font.Normal, ColorScheme.Orange)); } AddControl(new Overlay(soldier.Soldier.Paperdoll, 4)); }
public BattleSoldier PreviousSoldier(BattleSoldier soldier) { var index = Soldiers.IndexOf(soldier); var previousIndex = (index + Soldiers.Count - 1) % Soldiers.Count; return Soldiers[previousIndex]; }
public BattleSoldier NextSoldier(BattleSoldier soldier) { var index = Soldiers.IndexOf(soldier); var nextIndex = (index + 1) % Soldiers.Count; return Soldiers[nextIndex]; }