Esempio n. 1
0
 public bool Remove(FacilityData elementData) {
     FacilityHullCategory category = elementData.HullCategory;
     bool isRemoved = _composition[category].Remove(elementData);
     if (_composition[category].Count == Constants.Zero) {
         _composition.Remove(category);
     }
     return isRemoved;
 }
Esempio n. 2
0
 public bool Add(FacilityData elementData) {
     FacilityHullCategory category = elementData.HullCategory;
     if (!_composition.ContainsKey(category)) {
         _composition.Add(category, new List<FacilityData>());
     }
     if (_composition[category].Contains(elementData)) {
         return false;
     }
     _composition[category].Add(elementData);
     return true;
 }
Esempio n. 3
0
 private FacilityData CreateShipData(FacilityCategory hull, string shipName, IPlayer owner) {
     FacilityData shipData = new FacilityData(hull, shipName, 50F, mass: 10000F) {   // TODO mass variation
         // Ship's optionalParentName gets set when it gets attached to a fleet
         Strength = new CombatStrength(),
         CurrentHitPoints = UnityEngine.Random.Range(25F, 50F),
         Owner = owner,
     };
     return shipData;
 }
Esempio n. 4
0
 public bool Contains(FacilityData elementData) {
     FacilityHullCategory category = elementData.HullCategory;
     return _composition[category].Contains(elementData);
 }
 public FacilityInfoAccessController(FacilityData data) : base(data) { }
Esempio n. 6
0
 public FacilityReport(FacilityData data, Player player, IFacility_Ltd item) : base(data, player, item) { }