public FleetReport GetReport(Player player, AIntel intel, ShipReport[] elementReports) { if (!IsReportCurrent(player, intel.CurrentCoverage, elementReports)) { D.Log("{0} generating new {1} for Player {2}.", GetType().Name, typeof(FleetReport).Name, player.LeaderName); _elementReports = elementReports; _report = GenerateReport(player, intel, elementReports); _data.AcceptChanges(); } return _report; }
private void ConfigureDefensiveStrengthElement(GuiElement element, FleetReport report) { var strengthElement = element as GuiStrengthElement; strengthElement.DefensiveStrength = report.UnitDefensiveStrength; }
private void ConfigureHealthElement(GuiElement element, FleetReport report) { var healthElement = element as HealthGuiElement; healthElement.SetValues(report.UnitHealth, report.UnitCurrentHitPoints, report.UnitMaxHitPoints); }
private void ConfigureMaxSpeedElement(GuiElement element, FleetReport report) { var speedLabel = element.gameObject.GetSafeFirstMonoBehaviourInChildren<UILabel>(); speedLabel.text = report.UnitFullSpeed.HasValue ? _speedFormat.Inject(report.UnitFullSpeed.Value) : _unknown; }
private void ConfigureSizeElement(GuiElement element, FleetReport report, IIconInfo iconInfo) { var sizeElement = element as GuiSizeElement; sizeElement.SetValues(iconInfo, report.Category); }
private void ConfigureHeroElement(GuiElement element, FleetReport report) { var heroElement = element as HeroGuiElement; heroElement.__HeroName = "None"; // = report.Hero; }
private void ConfigureLocationElement(GuiElement element, FleetReport report) { var locationElement = element as GuiLocationElement; locationElement.SetValues(report.SectorIndex, report.__Position); }
private void ConfigureOwnerElement(GuiElement element, FleetReport report) { var ownerElement = element as OwnerGuiElement; ownerElement.Owner = report.Owner; }
private void ConfigureNameElement(GuiElement element, FleetReport report) { var nameLabel = element.gameObject.GetSafeFirstMonoBehaviourInChildren<UILabel>(); nameLabel.text = report.ParentName != null ? report.ParentName : _unknown; UIEventListener.Get(element.gameObject).onDoubleClick += CloseScreenAndFocusOnItem; // OPTIMIZE Cleanup? }