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


C# ProtoCrewMember类代码示例

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


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


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