Esempio n. 1
0
        /// <summary>
        ///    Called from Hardpoints.Unmount. Do not call from anywhere else!
        /// </summary>
        public void HandleUnmountFromSpacecraft()
        {
            if (IsEquipmentInstalled)
            {
                UninstallEquipment();
            }

            Spacecraft = null;
        }
Esempio n. 2
0
        /// <summary>
        ///    Called from Hardpoints.Mount. Do not call from anywhere else!
        /// </summary>
        public void HandleMountToSpacecraft(Spacecraft spacecraft)
        {
            Assert.IsNotNull(spacecraft);
            Assert.IsFalse(IsEquipmentInstalled);

            Spacecraft = spacecraft;

            if (_equipmentPendingInstallation != null)
            {
                InstallEquipment(_equipmentPendingInstallation);
                _equipmentPendingInstallation = null;
            }
        }
Esempio n. 3
0
 protected SpacecraftData(Spacecraft spacecraft) : base(spacecraft)
 {
     HardpointsData = spacecraft.Hardpoints.Select(hp => hp.GetSerializationData()).ToArray();
 }
Esempio n. 4
0
 public Hardpoints(Spacecraft spacecraft)
 {
     Spacecraft = spacecraft;
 }