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


C# Vessel.HasCommandStation方法代码示例

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


在下文中一共展示了Vessel.HasCommandStation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");

            // 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

示例3: 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

示例4: 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

示例5: ProtoSignalProcessor

 public ProtoSignalProcessor(ProtoPartModuleSnapshot ppms, Vessel v)
 {
     Vessel = v;
     Powered = ppms.GetBool("IsPowered");
     CommandStation = Powered && v.HasCommandStation() && Vessel.GetVesselCrew().Count >= 6;
 }
开发者ID:sidfu,项目名称:RemoteTechExtended,代码行数:6,代码来源:ProtoSignalProcessor.cs


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