/// <summary> /// Called from Hardpoints.Unmount. Do not call from anywhere else! /// </summary> public void HandleUnmountFromSpacecraft() { if (IsEquipmentInstalled) { UninstallEquipment(); } Spacecraft = null; }
/// <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; } }
protected SpacecraftData(Spacecraft spacecraft) : base(spacecraft) { HardpointsData = spacecraft.Hardpoints.Select(hp => hp.GetSerializationData()).ToArray(); }
public Hardpoints(Spacecraft spacecraft) { Spacecraft = spacecraft; }