Ejemplo n.º 1
0
 protected override void Awake() {
     base.Awake();
     _fleet = gameObject.GetSafeMonoBehaviour<FleetCmdModel>();
     _seeker = gameObject.GetSafeMonoBehaviour<Seeker>();
     _fleetData = _fleet.Data;
     _closeEnoughToWaypointDistance = 5F * GameTime.Instance.GameSpeed.SpeedMultiplier();
     Subscribe();
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 public FleetReportGenerator(FleetCmdData data) {
     _data = data;
     _gameMgr = References.GameManager;
     _stringBuilder = new StringBuilder();
 }
 public FleetInfoAccessController(FleetCmdData data) : base(data) { }
Ejemplo n.º 5
0
        // 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) {
        }
Ejemplo n.º 6
0
 private FleetCategory CalcPartialCmdCategory(FleetCmdData cmdData) {
     if (UnitComposition != null) {
         return cmdData.GenerateCmdCategory(UnitComposition);
     }
     return FleetCategory.None;
 }
Ejemplo n.º 7
0
 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;
 }
Ejemplo n.º 8
0
        //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();
        }