当前位置: 首页>>代码示例>>C#>>正文


C# Vessel.RevealName方法代码示例

本文整理汇总了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);

            }
        }
开发者ID:ve2dmn,项目名称:AsteroidScanner,代码行数:13,代码来源:MyScanner.cs

示例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>();
            
        }
开发者ID:OakTree42,项目名称:CivilianPopulation,代码行数:27,代码来源:Class1.cs

示例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;
        }
开发者ID:OakTree42,项目名称:CivilianPopulation,代码行数:29,代码来源:Class1.cs

示例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);
                }

            }
        }
开发者ID:ve2dmn,项目名称:AsteroidScanner,代码行数:32,代码来源:MyScanner.cs


注:本文中的Vessel.RevealName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。