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


C# ProtoCrewMember.StartRespawnPeriod方法代码示例

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


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

示例1: RespawnKerbal

 private void RespawnKerbal(ProtoCrewMember kerbal)
 {
     kerbal.SetTimeForRespawn(0);
     kerbal.StartRespawnPeriod();
     kerbal.rosterStatus = ProtoCrewMember.RosterStatus.Available;
     HighLogic.CurrentGame.CrewRoster.GetNextAvailableKerbal();
 }
开发者ID:sarbian,项目名称:CrewManifest,代码行数:7,代码来源:ManifestController.cs

示例2: KillCrewMember

        private void KillCrewMember(ProtoCrewMember crewMember, string causeOfDeath, Vessel vessel)
        {
            TimeWarp.SetRate(0, false);
            if (CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.IVA)
            {
                CameraManager.Instance.SetCameraFlight();
            }

            string vesselName = (!vessel.isEVA) ? vessel.vesselName + " - " : "";
            ScreenMessages.PostScreenMessage(vesselName + crewMember.name + " died of " + causeOfDeath + "!", 15.0f, ScreenMessageStyle.UPPER_CENTER);
            this.Log(vessel.vesselName + " - " + crewMember.name + " died of " + causeOfDeath + "!");

            if (!vessel.isEVA)
            {
                Part part = vessel.Parts.Find(p => p.protoModuleCrew.Contains(crewMember));
                if (part != null)
                {
                    part.RemoveCrewmember(crewMember);
                    crewMember.Die();

                    if (gameSettings.AllowCrewRespawn)
                    {
                        crewMember.StartRespawnPeriod(gameSettings.RespawnDelay);
                    }
                }
            }
            else
            {
                vessel.rootPart.Die();

                if (gameSettings.AllowCrewRespawn)
                {
                    crewMember.StartRespawnPeriod(gameSettings.RespawnDelay);
                }
            }

            gameSettings.knownCrew.Remove(crewMember.name);
        }
开发者ID:xxApvxx,项目名称:TacLifeSupport,代码行数:38,代码来源:LifeSupportController.cs

示例3: ReviveKerbal

 private static void ReviveKerbal(ProtoCrewMember protoCrewMember)
 {
     protoCrewMember.StartRespawnPeriod(0);
 }
开发者ID:Arduinology,项目名称:Khylib,代码行数:4,代码来源:HyperEditPanels.cs

示例4: KillCrewMember

        private void KillCrewMember(ProtoCrewMember crewMember, string causeOfDeath, Vessel vessel)
        {
            TimeWarp.SetRate(0, false);
            if (CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.IVA)
            {
                CameraManager.Instance.SetCameraFlight();
            }

            ScreenMessages.PostScreenMessage(vessel.vesselName + " - " + crewMember.name + " died of " + causeOfDeath + "!", 30.0f, ScreenMessageStyle.UPPER_CENTER);
            Debug.Log("TAC Life Support (LifeSupportController) [" + this.GetInstanceID().ToString("X") + "][" + Time.time + "]: " + vessel.vesselName + " - " + crewMember.name + " died of " + causeOfDeath + "!");

            if (!vessel.isEVA)
            {
                Part part = vessel.Parts.Find(p => p.protoModuleCrew.Contains(crewMember));
                if (part != null)
                {
                    part.RemoveCrewmember(crewMember);
                    crewMember.Die();

                    if (settings.AllowCrewRespawn)
                    {
                        crewMember.StartRespawnPeriod(settings.RespawnDelay);
                    }
                }
            }
            else
            {
                vessel.rootPart.Die();

                if (settings.AllowCrewRespawn)
                {
                    crewMember.StartRespawnPeriod(settings.RespawnDelay);
                }
            }
        }
开发者ID:NathanKell,项目名称:TacLifeSupport,代码行数:35,代码来源:LifeSupportController.cs

示例5: KillCrewmember

        public void KillCrewmember(ProtoCrewMember pcm, Vessel vessel)
        {

            //This code adapted from TAC Life Support, written by taraniselsu under the (CC BY-NC-SA 3.0) license. Source available here: https://github.com/taraniselsu/TacLifeSupport/blob/master/Source/LifeSupportController.cs
            TimeWarp.SetRate(0, true);
            if (CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.IVA)
            {
                CameraManager.Instance.SetCameraFlight();
            }

            Debug.Log("Terminus LS: " + pcm.name + " has died due to lack of life support at UT:"+Planetarium.GetUniversalTime()+"!");
            ScreenMessages.PostScreenMessage(pcm.name + " has died due to lack of life support!", 4.0f, ScreenMessageStyle.UPPER_CENTER);

            if (!vessel.isEVA)
            {
                Part part = vessel.Parts.Find(p => p.protoModuleCrew.Contains(pcm));
                if (part != null)
                {
                    part.RemoveCrewmember(pcm);
                    pcm.Die();

                    if (HighLogic.CurrentGame.Parameters.Difficulty.MissingCrewsRespawn)
                    {
                        pcm.StartRespawnPeriod();
                    }
                }
            }
            else
            {
                vessel.rootPart.Die();

                if (HighLogic.CurrentGame.Parameters.Difficulty.MissingCrewsRespawn)
                {
                    pcm.StartRespawnPeriod();
                }
            }

            //remove from the tracked and loaded lists
            KerbalInfo ki = GetInfoForPCM(pcm, false);
            TrackedKerbals.Remove(ki);
            LoadedKerbals.Remove(ki);
        }
开发者ID:magico13,项目名称:TerminusLS,代码行数:42,代码来源:Terminus_Life_Support.cs


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