本文整理汇总了C#中Vessel.GetInstanceID方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.GetInstanceID方法的具体用法?C# Vessel.GetInstanceID怎么用?C# Vessel.GetInstanceID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.GetInstanceID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: on_vessel_loaded
/// TEMPORARY FUNCTION
private void on_vessel_loaded(Vessel ves)
{
KDebug.Log("on loaded: ", KDebug.Type.EVENT);
if (ves == null) return;
VesselType type = ves.vesselType;
if (type != VesselType.SpaceObject & type != VesselType.EVA & type != VesselType.Flag & type != VesselType.Debris)
{
// === Debug information ===
KDebug.Log("Vessel debug information: ", KDebug.Type.CREATE);
KDebug.Log("ves.name: " + ves.name, KDebug.Type.CREATE);
KDebug.Log("ves.vesselName: " + ves.vesselName, KDebug.Type.CREATE);
KDebug.Log("ves.GetInstanceID: " + ves.GetInstanceID().ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.GetVessel: " + ves.GetVessel().ToString());
KDebug.Log("ves.vesselType: " + ves.vesselType.ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.vesselRanges: " + ves.vesselRanges.ToString());
//KDebug.Log("ves.vesselTransform: " + ves.vesselTransform.ToString());
//KDebug.Log("ves.VesselValues: " + ves.VesselValues.ToString());
//KDebug.Log("ves.GetType: " + ves.GetType().ToString());
KDebug.Log("ves.GetTotalMass: " + ves.GetTotalMass().ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.GetTransform: " + ves.GetTransform().ToString());
//KDebug.Log("ves.tag: " + ves.tag.ToString());
KDebug.Log("ves.loaded: " + ves.loaded.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isActiveAndEnabled: " + ves.isActiveAndEnabled.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isActiveVessel: " + ves.isActiveVessel.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isCommandable: " + ves.isCommandable.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.IsControllable: " + ves.IsControllable.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.launchTime: " + ves.launchTime.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.missionTime: " + ves.missionTime.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.packed: " + ves.packed.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.situation: " + ves.situation.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.state: " + ves.state.ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.ctrlState: " + ves.ctrlState.ToString());
KDebug.Log("ves.currentStage: " + ves.currentStage.ToString(), KDebug.Type.CREATE);
}
}
示例2: is_vessel_fits_to_mission
// Create mission from the Vessel
private Boolean is_vessel_fits_to_mission(Vessel ves)
{
if (ves == null) return false;
VesselType type = ves.vesselType;
//return type == VesselType.Ship | type == VesselType.Probe;
if (type != VesselType.SpaceObject & type != VesselType.EVA & type != VesselType.Flag & type != VesselType.Debris)
{
#region Debug information
// === Debug information ===
KDebug.Log("Vessel debug information: ", KDebug.Type.CREATE);
KDebug.Log("ves.name: " + ves.name, KDebug.Type.CREATE);
KDebug.Log("ves.vesselName: " + ves.vesselName, KDebug.Type.CREATE);
KDebug.Log("ves.GetInstanceID: " + ves.GetInstanceID().ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.GetVessel: " + ves.GetVessel().ToString());
//KDebug.Log("ves.vesselType: " + ves.vesselType.ToString());
//KDebug.Log("ves.vesselRanges: " + ves.vesselRanges.ToString());
//KDebug.Log("ves.vesselTransform: " + ves.vesselTransform.ToString());
//KDebug.Log("ves.VesselValues: " + ves.VesselValues.ToString());
//KDebug.Log("ves.GetType: " + ves.GetType().ToString());
KDebug.Log("ves.GetTotalMass: " + ves.GetTotalMass().ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.GetTransform: " + ves.GetTransform().ToString());
//KDebug.Log("ves.tag: " + ves.tag.ToString());
KDebug.Log("ves.loaded: " + ves.loaded.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isActiveAndEnabled: " + ves.isActiveAndEnabled.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isActiveVessel: " + ves.isActiveVessel.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.isCommandable: " + ves.isCommandable.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.IsControllable: " + ves.IsControllable.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.launchTime: " + ves.launchTime.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.missionTime: " + ves.missionTime.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.packed: " + ves.packed.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.situation: " + ves.situation.ToString(), KDebug.Type.CREATE);
KDebug.Log("ves.state: " + ves.state.ToString(), KDebug.Type.CREATE);
//KDebug.Log("ves.ctrlState: " + ves.ctrlState.ToString());
KDebug.Log("ves.currentStage: " + ves.currentStage.ToString(), KDebug.Type.CREATE);
}else if(type == VesselType.EVA)
{
KDebug.Log("EVA debug information: ", KDebug.Type.CREATE);
KDebug.Log("ves.vesselName: " + ves.vesselName, KDebug.Type.CREATE);
KDebug.Log("ves.rootPart: " + ves.rootPart.ToString(), KDebug.Type.CREATE);
}
/*
* ves.situation: PRELAUNCH () <- ?
* ves.state: INACTIVE
* ves.currentStage: 1
* ves.missionTime: 0 (!)
* ves.IsControllable: False (.)
* ves.isCommandable: True (.)
* ves.isActiveVessel: False
* ves.isActiveAndEnabled: True (?)
* ves.loaded: False
* ves.vesselType: Ship (!) <- ?
*/
#endregion
// (ves.missionTime < 0.1); Condition for the mission time. It should be checked only if we create a new flight.
// This conditions should be ok
Boolean is_ok = ( (ves.isCommandable | ves.IsControllable) & (type == VesselType.Ship | type == VesselType.Probe) & ves.loaded ); // Apparently the last parameter (ves.loaded) needs to be check
KDebug.Log("Is vessel conditions are ok for aproove for " + VesselType.Ship.ToString() + " " + ves.name + "? " + is_ok.ToString(), KDebug.Type.CREATE);
return is_ok;
}