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


C# Vessel.GetVesselCrew方法代码示例

本文整理汇总了C#中Vessel.GetVesselCrew方法的典型用法代码示例。如果您正苦于以下问题:C# Vessel.GetVesselCrew方法的具体用法?C# Vessel.GetVesselCrew怎么用?C# Vessel.GetVesselCrew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vessel的用法示例。


在下文中一共展示了Vessel.GetVesselCrew方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProtoSignalProcessor

 public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
 {
     mVessel = v;
     Powered = ppms.GetBool("IsRTPowered");
     IsCommandStation = Powered && v.HasCommandStation() && v.GetVesselCrew().Count >= 6;
     RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})", Powered, v.HasCommandStation(), v.GetVesselCrew().Count);
 }
开发者ID:Kevin-010,项目名称:RemoteTech2,代码行数:7,代码来源:ProtoSignalProcessor.cs

示例2: ProtoSignalProcessor

 public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
 {
     Vessel = v;
     Powered = ppms.GetBool("IsRTPowered");
     CommandStation = Powered && v.HasCommandStation() && v.GetVesselCrew().Count >= 6;
     RTUtil.Log("ProtoSignalProcessor: Powered: {0}, CommandStation: {1}, Crew: {2}",
         Powered, v.HasCommandStation(), v.GetVesselCrew().Count);
 }
开发者ID:Guardian259,项目名称:RemoteTechExtended,代码行数:8,代码来源:ProtoSignalProcessor.cs

示例3: ProtoSignalProcessor

        public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
        {
            Vessel = v;
            Powered = ppms.GetBool("IsRTPowered");

            // get the crew count from the vessel
            var crewcount = v.GetVesselCrew().Count;

            // when the crew count is equal to 0 then look into the protoVessel
            if (crewcount == 0 && v.protoVessel.GetVesselCrew() != null)
                crewcount = v.protoVessel.GetVesselCrew().Count;

            RTLog.Notify("ProtoSignalProcessor crew count of {0} is {1}", v.vesselName, crewcount);

            int ppmsMinCrew;
            //try to get the RTCommandMinCrew value in the ProtoPartModuleSnapshot
            if (ppms.GetInt("RTCommandMinCrew", out ppmsMinCrew))
            {
                IsCommandStation = Powered && v.HasCommandStation() && crewcount >= ppmsMinCrew;
                RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2}/{3})",
                    Powered, v.HasCommandStation(), crewcount, ppmsMinCrew);
            }
            else
            {
                // there was no RTCommandMinCrew member in the ProtoPartModuleSnapshot
                IsCommandStation = false;

                RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})",
                    Powered, v.HasCommandStation(), crewcount);
            }
        }
开发者ID:RemoteTechnologiesGroup,项目名称:RemoteTech,代码行数:31,代码来源:ProtoSignalProcessor.cs

示例4: CSXCrewManagement

        public CSXCrewManagement(Vessel vessel)
        {
            crews = new List<CSXCrew>();

            foreach (ProtoCrewMember crew in vessel.GetVesselCrew())
                crews.Add(new CSXCrew(crew));
        }
开发者ID:CSXIndustry,项目名称:LifeSupport,代码行数:7,代码来源:CSXCrewManagement.cs

示例5: GetVesselCrew

        /// <summary>
        /// Gets the vessel crew and works for EVAs as well
        /// </summary>
        /// <param name="v"></param>
        /// <returns></returns>
        public static IEnumerable<ProtoCrewMember> GetVesselCrew(Vessel v)
        {
            if (v == null)
            {
                yield break;
            }

            // EVA vessel
            if (v.vesselType == VesselType.EVA)
            {
                if (v.parts == null)
                {
                    yield break;
                }

                foreach (Part p in v.parts)
                {
                    foreach (ProtoCrewMember pcm in p.protoModuleCrew)
                    {
                        yield return pcm;
                    }
                }
            }
            else
            {
                // Vessel with crew
                foreach (ProtoCrewMember pcm in v.GetVesselCrew())
                {
                    yield return pcm;
                }
            }
        }
开发者ID:jrossignol,项目名称:Strategia,代码行数:37,代码来源:VesselUtil.cs

示例6: ProtoSignalProcessor

        public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
        {
            mVessel = v;
            Powered = ppms.GetBool("IsRTPowered");

            // get the crew count from the vessel
            int crewcount = v.GetVesselCrew().Count;
            // when the crewcount is eq 0 than look into the protoVessel
            if (crewcount == 0 && v.protoVessel.GetVesselCrew() != null)
                crewcount = v.protoVessel.GetVesselCrew().Count;

            RTLog.Notify("ProtoSignalProcessor crew count of {0} is {1}", v.vesselName, crewcount);

            try {
                IsCommandStation = Powered && v.HasCommandStation() && crewcount >= ppms.GetInt("RTCommandMinCrew");
                RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2}/{3})",
                    Powered, v.HasCommandStation(), crewcount, ppms.GetInt("RTCommandMinCrew"));
            } catch (ArgumentException argexeception) {
                // I'm assuming this would get thrown by ppms.GetInt()... do the other functions have an exception spec?
                IsCommandStation = false;
                RTLog.Notify("ProtoSignalProcessor(Powered: {0}, HasCommandStation: {1}, Crew: {2})",
                    Powered, v.HasCommandStation(), crewcount);
                RTLog.Notify("ProtoSignalProcessor ", argexeception);
            }
        }
开发者ID:icedown,项目名称:RemoteTech,代码行数:25,代码来源:ProtoSignalProcessor.cs

示例7: OnVesselRecovered

 private void OnVesselRecovered(Vessel vessel)
 {
     // When a vessel is recovered ensure that all kerbals are removed from the used/dead lists.
     foreach (var crewMember in vessel.GetVesselCrew())
     {
         usedKerbals.Remove(crewMember.name);
         deadKerbals.Remove(crewMember.name);
     }
 }
开发者ID:citruspress,项目名称:DarkMultiPlayer,代码行数:9,代码来源:ReputationSystem.cs

示例8: SetCrew

 protected void SetCrew(Vessel v)
 {
     LoggingUtil.LogVerbose(this, "Setting crew to those on vessel " + v.vesselName);
     foreach (ProtoCrewMember pcm in v.GetVesselCrew())
     {
         LoggingUtil.LogVerbose(this, "    Adding " + pcm.name + " to crew list.");
         crew.AddUnique(pcm);
     }
 }
开发者ID:linuxgurugamer,项目名称:ContractConfigurator,代码行数:9,代码来源:AwardExperience.cs

示例9: RecordDocking

 public void RecordDocking(Vessel vessel)
 {
    List<ProtoCrewMember> crew = vessel.GetVesselCrew();
    foreach (ProtoCrewMember member in crew)
    {
       Log.Info("kerbal " + member.name + " docked");
       hallOfFame.RecordDocking(member);
    }
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:9,代码来源:AchievementRecorder.cs

示例10: HasCrew

 public static bool HasCrew(Vessel v, string skill)
 {
     var crew = v.GetVesselCrew();
     var count = crew.Count;
     for (int i = 0; i < count; ++i)
     {
         if (crew[i].experienceTrait.TypeName == skill)
             return true;
     }
     return false;
 }
开发者ID:BobPalmer,项目名称:UmbraSpaceIndustries,代码行数:11,代码来源:LogisticsTools.cs

示例11: GetTotalWaitTime

        public static double GetTotalWaitTime(Vessel vessel)
        {
            double waitTotal = 0;

            if (RemoteTechHook.IsAvailable(vessel.id) && vessel.GetVesselCrew().Count == 0)
            {
                waitTotal = RemoteTechHook.Instance.GetShortestSignalDelay(vessel.id);
            }

            return waitTotal;
        }
开发者ID:KSP-KOS,项目名称:KOS,代码行数:11,代码来源:RemoteTechUtility.cs

示例12: RecordLaunch

 public void RecordLaunch(Vessel vessel)
 {
    List<ProtoCrewMember> crew = vessel.GetVesselCrew();
    foreach (ProtoCrewMember member in crew)
    {
       if (!member.IsTourist())
       {
          Log.Info("kerbal " + member.name + " launched");
          hallOfFame.RecordLaunch(member);
       }
    }
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:12,代码来源:AchievementRecorder.cs

示例13: OnVesselChanged

        private void OnVesselChanged(Vessel vessel)
        {
            if (FlightGlobals.ActiveVessel != vessel)
                return;

            // Keep track of which kerbals has been used, to know if a penalty is appropriate or not when a kerbal dies.
            foreach (var crewMember in vessel.GetVesselCrew())
            {
                usedKerbals.Add(crewMember.name);
                deadKerbals.Remove(crewMember.name);
            }
        }
开发者ID:citruspress,项目名称:DarkMultiPlayer,代码行数:12,代码来源:ReputationSystem.cs

示例14: RecycleKerbal

        public float RecycleKerbal(Vessel v)
        {
            if (!v.isEVA)
            return 0;

            // idea and numbers taken from Kethane
            if (v.GetVesselCrew()[0].isBadass) {
            v.rootPart.explosionPotential = 10000;
            }
            FlightGlobals.ForceSetActiveVessel(this.vessel);
            v.rootPart.explode();

            float mass = 0;
            mass += ReclaimResource("Kethane", 150, v.name);
            mass += ReclaimResource("Metal", 1, v.name);
            return mass;
        }
开发者ID:skykooler,项目名称:Extraplanetary-Launchpads,代码行数:17,代码来源:Recycler.cs

示例15: Record

 public void Record(Ribbon ribbon, Vessel vessel)
 {
    if(vessel==null)
    {
       Log.Warning("no vessel for recorded ribbon "+ribbon.GetName());
       return;
    }
    if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("recording ribbon "+ribbon.GetName()+" for vessel "+vessel.GetName());
    List<ProtoCrewMember> crew = vessel.GetVesselCrew();
    if (crew != null)
    {
       hallOfFame.BeginArwardOfRibbons();
       foreach (ProtoCrewMember member in crew)
       {
          if(!member.IsTourist())
          {
             Record(ribbon, member);
          }
       }
       hallOfFame.EndArwardOfRibbons();
    }
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:22,代码来源:AchievementRecorder.cs


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