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

            Spacecraft = null;
        }
コード例 #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;
            }
        }
コード例 #3
0
 protected SpacecraftData(Spacecraft spacecraft) : base(spacecraft)
 {
     HardpointsData = spacecraft.Hardpoints.Select(hp => hp.GetSerializationData()).ToArray();
 }
コード例 #4
0
 public Hardpoints(Spacecraft spacecraft)
 {
     Spacecraft = spacecraft;
 }