protected override void Awake() { base.Awake(); _fleet = gameObject.GetSafeMonoBehaviour<FleetCmdModel>(); _seeker = gameObject.GetSafeMonoBehaviour<Seeker>(); _fleetData = _fleet.Data; _closeEnoughToWaypointDistance = 5F * GameTime.Instance.GameSpeed.SpeedMultiplier(); Subscribe(); }
public FleetNavigator(FleetCmdModel fleet, Seeker seeker) { // AStar.Seeker requires this Navigator to stay in this VS Project _data = fleet.Data; _fleet = fleet; _seeker = seeker; _gameTime = GameTime.Instance; _gameSpeedMultiplier = _gameTime.GameSpeed.SpeedMultiplier(); // FIXME where/when to get initial GameSpeed before first GameSpeed change? AssessFrequencyOfCourseProgressChecks(); Subscribe(); }
public FleetReportGenerator(FleetCmdData data) { _data = data; _gameMgr = References.GameManager; _stringBuilder = new StringBuilder(); }
public FleetInfoAccessController(FleetCmdData data) : base(data) { }
// 7.10.16 Eliminated usage of ElementReports to calculate partial Unit values. // 7.18.16 If Cmd's IntelCoverage does not allow full view of selected values // a partial value is calculated from element's data and their infoAccessCntlr. public FleetCmdReport(FleetCmdData cmdData, Player player, IFleetCmd_Ltd item) : base(cmdData, player, item) { }
private FleetCategory CalcPartialCmdCategory(FleetCmdData cmdData) { if (UnitComposition != null) { return cmdData.GenerateCmdCategory(UnitComposition); } return FleetCategory.None; }
private FleetComposition CalcPartialUnitComposition(FleetCmdData cmdData) { var elementsData = GetElementsData(cmdData).Cast<ShipData>(); IList<ShipHullCategory> knownElementCategories = new List<ShipHullCategory>(); foreach (var eData in elementsData) { var accessCntlr = eData.InfoAccessCntlr; if (accessCntlr.HasAccessToInfo(Player, ItemInfoID.Category)) { knownElementCategories.Add(eData.HullCategory); } } if (knownElementCategories.Count > Constants.Zero) { // Player will always know about the HQElement (since knows Cmd) but Category may not yet be revealed return new FleetComposition(knownElementCategories); } return null; }
//private IList<IDisposable> _subscriptions; internal FleetNavigator(FleetCmdItem fleet, Seeker seeker) { ApCourse = new List<IFleetNavigable>(); _gameTime = GameTime.Instance; _gameMgr = GameManager.Instance; _jobMgr = JobManager.Instance; _fleet = fleet; _fleetData = fleet.Data; _seeker = InitializeSeeker(seeker); Subscribe(); }