• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ProtoCrewMember类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ProtoCrewMember的典型用法代码示例。如果您正苦于以下问题:C# ProtoCrewMember类的具体用法?C# ProtoCrewMember怎么用?C# ProtoCrewMember使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProtoCrewMember类属于命名空间,在下文中一共展示了ProtoCrewMember类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Kerbal

        public Kerbal(ProtoCrewMember.Gender gender, string name)
        {
            Initialize(gender, name);

            this.gender = gender;
            this.name = name;
        }
开发者ID:Kerbas-ad-astra,项目名称:ContractConfigurator,代码行数:7,代码来源:Kerbal.cs


示例2: CanKerbalBeAdded

 internal static bool CanKerbalBeAdded(ProtoCrewMember kerbal)
 {
     return ((SMSettings.RealismMode && SMAddon.SmVessel.IsRecoverable) || !SMSettings.RealismMode) &&
      kerbal.rosterStatus == ProtoCrewMember.RosterStatus.Available &&
      SMAddon.SmVessel.SelectedPartsSource.Count > 0 &&
      !SMPart.IsCrewFull(SMAddon.SmVessel.SelectedPartsSource[0]);
 }
开发者ID:Kerbas-ad-astra,项目名称:ShipManifest,代码行数:7,代码来源:SMConditions.cs


示例3: IsQualifiedByMissionCount

 private bool IsQualifiedByMissionCount(ProtoCrewMember kerbal)
 {
    HallOfFameEntry entry = HallOfFame.Instance().GetEntry(kerbal);
    if (entry == null) return false;
    if (entry.MissionsFlown < 50) return false;
    return true;
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:7,代码来源:Promoter.cs


示例4: PromoteIfEligible

 public void PromoteIfEligible(ProtoCrewMember kerbal)
 {
    if(IsQualifiedByMissionCount(kerbal))
    {
       Promote(kerbal);
    }
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:7,代码来源:Promoter.cs


示例5: FetchKerbal

        public LifeSupportStatus FetchKerbal(ProtoCrewMember crew)
        {
            if (!IsKerbalTracked(crew.name))
            {
                var k = new LifeSupportStatus();
                k.KerbalName = crew.name;
                k.HomeBodyId = FlightGlobals.GetHomeBodyIndex();
                k.LastPlanet = FlightGlobals.GetHomeBodyIndex();
                k.LastMeal = Planetarium.GetUniversalTime();
                k.LastEC = Planetarium.GetUniversalTime();
                k.LastAtHome = Planetarium.GetUniversalTime();
                k.LastSOIChange = Planetarium.GetUniversalTime();
                k.MaxOffKerbinTime = 648000;    //TODO - make this configurable
                k.TimeEnteredVessel = Planetarium.GetUniversalTime();
                k.CurrentVesselId = "?UNKNOWN?";
                k.PreviousVesselId = "??UNKNOWN??";
                k.LastUpdate = Planetarium.GetUniversalTime();
                k.IsGrouchy = false;
                k.OldTrait = crew.experienceTrait.Title;
                TrackKerbal(k);
            }

            var kerbal = LifeSupportInfo.FirstOrDefault(k => k.KerbalName == crew.name);
            return kerbal;
        }
开发者ID:fat-lobyte,项目名称:USI-LS,代码行数:25,代码来源:LifeSupportManager.cs


示例6: GetEvaAction

 public static EvaAction GetEvaAction(ProtoCrewMember kerbal, Vessel fromVessel)
 {
    if (fromVessel != null)
    {
       bool atmosphere = fromVessel.IsInAtmosphere();
       bool oxygen = fromVessel.IsInAtmosphereWithOxygen();
       if (Log.IsLogable(Log.LEVEL.DETAIL)) Log.Detail("creating EVA action for kerbal " + kerbal.name + " in atmosphere:" + atmosphere + ", oxygen:" + oxygen);
       if (atmosphere && oxygen)
       {
          return ActionPool.ACTION_EVA_OXYGEN;                     
       }
       else if (atmosphere && ! oxygen)
       {
          return ActionPool.ACTION_EVA_INATM;                     
       }
       else if (!atmosphere)
       {
          return ActionPool.ACTION_EVA_NOATM;                     
       }
       else
       {
          Log.Warning("unexpected EVA situation");
          return ActionPool.ACTION_EVA_NOATM;
       }
    }
    else
    {
       Log.Warning("no vessel for kerbal "+kerbal.name+" on EVA");
       return ActionPool.ACTION_EVA_NOATM;
    }
 }
开发者ID:Kerbas-ad-astra,项目名称:FinalFrontier,代码行数:31,代码来源:Action.cs


示例7: addCrewObject

        public void addCrewObject(ProtoCrewMember c)
        {
            Notes_CrewObject o = new Notes_CrewObject(c, this);

            if (!allCrew.ContainsKey(c.name))
                allCrew.Add(c.name, o);
        }
开发者ID:DMagic1,项目名称:KSP_Vessel_Manager,代码行数:7,代码来源:Notes_CrewContainer.cs


示例8: OnKerbalStatusChange

        private void OnKerbalStatusChange(ProtoCrewMember pcm, ProtoCrewMember.RosterStatus oldStatus, ProtoCrewMember.RosterStatus newStatus)
        {
            if (oldStatus == ProtoCrewMember.RosterStatus.Assigned && newStatus == ProtoCrewMember.RosterStatus.Available)
            {
                FlightLog tmpLog = new FlightLog();
                foreach (FlightLog.Entry entry in pcm.careerLog.Entries.Union(pcm.flightLog.Entries))
                {
                    tmpLog.AddEntry(entry);
                }

                float xp = KerbalRoster.CalculateExperience(pcm.careerLog);
                float xp2 = KerbalRoster.CalculateExperience(tmpLog);

                float amount = (xp2 - xp) * multiplier;

                if (currency == Currency.Funds)
                {
                    Funding.Instance.AddFunds(amount, TransactionReasons.Strategies);
                }
                else if (currency == Currency.Reputation)
                {
                    Reputation.Instance.AddReputation(amount, TransactionReasons.Strategies);
                }
                else if (currency == Currency.Science)
                {
                    ResearchAndDevelopment.Instance.AddScience(amount, TransactionReasons.Strategies);
                }

                CurrencyPopup.Instance.AddPopup(currency, amount, TransactionReasons.Strategies, Parent.Config.Title, false);
            }
        }
开发者ID:jrossignol,项目名称:Strategia,代码行数:31,代码来源:CurrencyOperationKerbalRecovery.cs


示例9: SpawnPassengers

 public SpawnPassengers(List<string> passengerNames, int minPassengers, ProtoCrewMember.Gender? gender, ProtoCrewMember.KerbalType kerbalType, string experienceTrait)
 {
     this.passengerNames = passengerNames;
     this.count = passengerNames.Count != 0 ? passengerNames.Count : minPassengers;
     this.gender = gender;
     this.kerbalType = kerbalType;
     this.experienceTrait = experienceTrait;
 }
开发者ID:ToneStack87,项目名称:ContractConfigurator,代码行数:8,代码来源:SpawnPassengers.cs


示例10: TimeToStranded

    public static int TimeToStranded(ProtoCrewMember Kerb) {
      Vessel Vsl = GetVessel (Kerb);
      if (Vsl != null) {
        return TimeHelper.Days (TimeHelper.ToYears (2) - Vsl.missionTime);
      }

      return 0;
    }
开发者ID:nanathan,项目名称:StateFunding,代码行数:8,代码来源:KerbalHelper.cs


示例11: IrradiateKerbal

 // Irradiates a kerbal
 public void IrradiateKerbal(ProtoCrewMember crew, Vessel crewVessel, double pointAmount)
 {
     foreach (KeyValuePair<string,RadioactivityKerbal> kerbal in KerbalDB.Kerbals)
     {
       if (crew == kerbal.Value.Kerbal)
         kerbal.Value.IrradiatePoint(crewVessel, pointAmount);
     }
 }
开发者ID:ChrisAdderley,项目名称:Radioactivity,代码行数:9,代码来源:KerbalTracking.cs


示例12: foreach

        /*      public void OnContractOffered(Contracts.Contract contract)
        {
            System.Type type = contract.GetType();
            if (contract is FinePrint.Contracts.TourismContract);
            {

            }
            foreach (var p in contract.AllParameters)
            {
                Debug.Log(p);
            }
        } */
        public void ArchiveKerbal(ProtoCrewMember pcm)
        {
            Debug.Log("Archiving " + pcm.name);
            pcm.type = ProtoCrewMember.KerbalType.Crew;
            KerbalRoster.SetExperienceTrait(pcm);
            CustomerRecord customer = new CustomerRecord(pcm);
            customer.status = "ARCHIVED";
            CustomerSave.ArchivedCustomers()[pcm.name] = customer;
        }
开发者ID:SpareToast,项目名称:CustomerSatisfactionProgram,代码行数:21,代码来源:CustomerManager.cs


示例13: BeginTask

        public void BeginTask(ProtoCrewMember kerbal, double UT, string task,
							   string body, string situation)
        {
            if (!kerbal_experience.ContainsKey (kerbal.name)) {
                AddKerbal (kerbal);
            }
            var exp = kerbal_experience[kerbal.name];
            exp.BeginTask (UT, task, body, situation);
        }
开发者ID:Kerbas-ad-astra,项目名称:KerbalStats,代码行数:9,代码来源:Tracker.cs


示例14: GetSeat

 string GetSeat(ProtoCrewMember kerbal)
 {
     // Try to find the seat name
     string seat = "";
     if (kerbal.seat != null) {
         seat = kerbal.seat.seatTransformName;
     }
     return seat;
 }
开发者ID:Kerbas-ad-astra,项目名称:KerbalStats,代码行数:9,代码来源:Events.cs


示例15: KerbalModel

 public KerbalModel(ProtoCrewMember kerbal, bool isNew)
 {
     this.Kerbal = kerbal;
     Name = kerbal.name;
     Stupidity = kerbal.stupidity;
     Courage = kerbal.courage;
     Badass = kerbal.isBadass;
     IsNew = isNew;
 }
开发者ID:vXSovereignXv,项目名称:CrewManifest,代码行数:9,代码来源:Models.cs


示例16: CrewMember

 public CrewMember(ProtoCrewMember _crew, Part _part, int _index)
 {
     crew = _crew;
     part = _part;
     index = _index;
     Stupidity = _crew.stupidity;
     Courage = _crew.courage;
     isBadass = _crew.isBadass;
     Name = _crew.name;
 }
开发者ID:KevinMilcz,项目名称:Firespitter,代码行数:10,代码来源:FScrewTransfer.cs


示例17: ModKerbal

 public ModKerbal(ProtoCrewMember kerbal, bool isNew)
 {
     this.Kerbal = kerbal;
     Name = kerbal.name;
     Stupidity = kerbal.stupidity;
     Courage = kerbal.courage;
     Badass = kerbal.isBadass;
     Title = kerbal.experienceTrait.Title;
     Gender = kerbal.gender;
     IsNew = isNew;
 }
开发者ID:7FeiW,项目名称:ShipManifest,代码行数:11,代码来源:ModKerbal.cs


示例18: ModKerbal

 public ModKerbal(ProtoCrewMember kerbal, bool isNew)
 {
     Kerbal = kerbal;
       Name = kerbal.name;
       Stupidity = kerbal.stupidity;
       Courage = kerbal.courage;
       Badass = kerbal.isBadass;
       Trait = kerbal.trait;
       Gender = kerbal.gender;
       IsNew = isNew;
 }
开发者ID:Kerbas-ad-astra,项目名称:ShipManifest,代码行数:11,代码来源:ModKerbal.cs


示例19: IsStranded

    public static bool IsStranded(ProtoCrewMember Kerb) {
      Vessel Vsl = GetVessel (Kerb);
      if (Vsl != null
        && KerbalHelper.QualifiedStranded(Kerb)
        && Vsl.missionTime > TimeHelper.ToYears(2)) {

        return true;
      }

      return false;
    }
开发者ID:nanathan,项目名称:StateFunding,代码行数:11,代码来源:KerbalHelper.cs


示例20: OnCrewmemberHired

 // callback for new crew member hired
 private void OnCrewmemberHired(ProtoCrewMember kerbal, int value)
 {
     // its better to be safe than sorry
      if (kerbal == null) return;
      //
      Debug.Log("applicant " + kerbal.name+ " will receive the KSP ribbon");
      //
      // now we want to award the KSP ribbon
      this.adapter.AwardRibbonToKerbal(RIBBON_CODE, kerbal);
      // an alternative to award the ribbon:
      //this.adapter.AwardRibbonToKerbal(KspRibbon, kerbal);
 }
开发者ID:Nereid42,项目名称:FinalFrontierAdapter,代码行数:13,代码来源:Example.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ProtoReader类代码示例发布时间:2022-05-24
下一篇:
C# ProtoCore.Type类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap