本文整理汇总了C#中Vessel.RevealName方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.RevealName方法的具体用法?C# Vessel.RevealName怎么用?C# Vessel.RevealName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vessel
的用法示例。
在下文中一共展示了Vessel.RevealName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TrackAsteroid
/// <summary>
/// Stuff
/// </summary>
public static void TrackAsteroid(Vessel v)
{
Debug.Log ("DiscoveryLevels " + v.DiscoveryInfo.Level );
if (v.DiscoveryInfo.Level == DiscoveryLevels.None || v.DiscoveryInfo.Level == DiscoveryLevels.Presence ) {
Debug.Log ("Set tracking to " + v.RevealName ());
v.DiscoveryInfo.SetLastObservedTime (Planetarium.GetUniversalTime ());
v.DiscoveryInfo.SetLevel (DiscoveryLevels.Unowned);
}
}
示例2: updateVessel
public void updateVessel(Vessel v, ref xPipeLine pipe)
{
id = v.id.ToString();
lat = v.latitude;
name = v.RevealName();
lon = v.longitude;
body = v.mainBody.name;
altitude = v.altitude;
//var modulelist = v.FindPartModulesImplementing<xPipeLine>();
foreach (string res in pipe.totalSupply.Keys)
{
resourceSupply[res] = pipe.totalSupply[res];
resourceDemand[res] = pipe.totalDemand[res];
resourceCapacity[res] = pipe.totalCapacity[res]; //don't touch the unfocused productivity
}
foreach(string res in pipe.networkDelta.Keys)
networkDraw[res] = pipe.networkDelta[res];
loaded = v.loaded;
debug();
// resourceSupply = new Dictionary<string, double>();
// resourceDemand = new Dictionary<string, double>();
// ret.resourceCapacity = new Dictionary<string, double>();
}
示例3: fromVessel
public static pipelineShip fromVessel(Vessel v, ref xPipeLine pipe)
{
pipelineShip ret = new pipelineShip();
ret.id = v.id.ToString();
ret.lat = v.latitude;
ret.lon = v.longitude;
ret.name = v.RevealName() ;
ret.body = v.mainBody.name;
ret.altitude = v.altitude;
var modulelist = v.FindPartModulesImplementing<xPipeLine>();
ret.resourceSupply = new Dictionary<string, double>();
ret.resourceDemand = new Dictionary<string, double>();
ret.resourceCapacity = new Dictionary<string, double>();
ret.unfocusedProductivity = new Dictionary<string, double>();
ret.loaded = true;
foreach(string res in pipe.totalSupply.Keys)
{
ret.resourceSupply[res] = pipe.totalSupply[res];
ret.resourceDemand[res] = pipe.totalDemand[res];
ret.resourceCapacity[res] = pipe.totalCapacity[res];
ret.unfocusedProductivity[res] = 0;
}
ret.networkDraw = new Dictionary<string,double>();
foreach(string res in pipe.networkDelta.Keys)
ret.networkDraw[res] = pipe.networkDelta[res];
return ret;
}
示例4: MakeNewAlarm
/// <summary>
/// Stuff
/// </summary>
private static void MakeNewAlarm(Vessel v)
{
if (KACWrapper.APIReady) {
//Check if Alarm already exist
Predicate<KACWrapper.KACAPI.KACAlarm> VesselFinder = (KACWrapper.KACAPI.KACAlarm a) => {return a.VesselID == v.id.ToString();};
KACWrapper.KACAPI.KACAlarm OldAlarm = KACWrapper.KAC.Alarms.Find(VesselFinder);
//String aID = OldAlarm.ID;
//Debug.Log ("String aID:" + aID);
//If not
if (OldAlarm == null) {
Debug.Log ("Adding New Alarm");
String aID = KACWrapper.KAC.CreateAlarm (KACWrapper.KACAPI.AlarmTypeEnum.SOIChange, v.RevealName () + " Heading for Kerbin", v.orbit.UTsoi);
if (aID != "") {
//if the alarm was made get the object so we can update it
KACWrapper.KACAPI.KACAlarm a = KACWrapper.KAC.Alarms.First (z => z.ID == aID);
//Now update some of the other properties
a.Notes = "An Asteroid is on a collision Course for Kerbin";
a.AlarmAction = KACWrapper.KACAPI.AlarmActionEnum.KillWarp;
a.VesselID = v.id.ToString ();
}
} else {
Debug.Log ("Alarm Already exist:" + OldAlarm.ID);
}
}
}