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


C# SimDescription.SetDeathStyle方法代码示例

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


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

示例1: Run

        protected override bool Run(SimDescription me, bool singleSelection)
        {
            if (!base.Run(me, singleSelection)) return false;

            foreach (SelectionCriteria.Occult.Values type in mTypes)
            {
                if (type.mOccult == OccultTypes.Ghost)
                {
                    Urnstone stone = Urnstones.FindGhostsGrave(me);

                    if ((stone != null) && (me.CreatedSim != null))
                    {
                        stone.GhostToSim(me.CreatedSim, false, false);
                    }
                    else
                    {
                        me.SetDeathStyle(SimDescription.DeathType.None, false);
                        me.IsGhost = false;
                        me.IsNeverSelectable = false;
                        me.ShowSocialsOnSim = true;
                        me.AgingEnabled = true;

                        if (stone != null)
                        {
                            stone.Destroy();
                        }
                    }
                }
                else
                {
                    OccultTypeHelper.Remove(me, type.mOccult, true);
                }
            }

            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:36,代码来源:RemoveOccult.cs

示例2: CreateGrave


//.........这里部分代码省略.........
                    if (Inventories.TryToMove(urnstone, me.CreatedSim.Inventory))
                    {
                        success = true;
                    }
                }

                if ((!success) && (Sim.ActiveActor != null))
                {
                    if (Inventories.TryToMove(urnstone, Sim.ActiveActor.Inventory))
                    {
                        success = true;
                    }
                }

                if (!success) return null;
            }

            if (report)
            {
                Common.Notify(Common.Localize("ForceKill:Success", me.IsFemale, new object[] { me }));
            }

            if ((addOnly) && (!ignoreExisting))
            {
                return urnstone;
            }

            if ((originalHousehold == Household.ActiveHousehold) && (me.CreatedSim != null))
            {
                HudModel model = HudController.Instance.Model as HudModel;

                foreach (SimInfo info in model.mSimList)
                {
                    if (info.mGuid == me.CreatedSim.ObjectId)
                    {
                        model.RemoveSimInfo(info);
                        model.mSimList.Remove(info);
                        break;
                    }
                }
            }

            if (me.CreatedSim != null)
            {
                me.CreatedSim.Destroy();
            }

            if (originalHousehold != null)
            {
                originalHousehold.Remove(me, !originalHousehold.IsSpecialHousehold);
            }

            if (me.DeathStyle == SimDescription.DeathType.None)
            {
                if (me.IsHuman)
                {
                    switch (deathType)
                    {
                        case SimDescription.DeathType.None:
                        case SimDescription.DeathType.PetOldAgeBad:
                        case SimDescription.DeathType.PetOldAgeGood:
                            deathType = SimDescription.DeathType.OldAge;
                            break;
                    }
                }
                else
                {
                    switch (deathType)
                    {
                        case SimDescription.DeathType.None:
                        case SimDescription.DeathType.OldAge:
                            deathType = SimDescription.DeathType.PetOldAgeGood;
                            break;
                    }
                }

                me.SetDeathStyle(deathType, true);
            }

            me.IsNeverSelectable = true;
            me.Contactable = false;
            me.Marryable = false;

            if (me.CreatedSim == PlumbBob.SelectedActor)
            {
                LotManager.SelectNextSim();
            }

            if (me.CareerManager != null)
            {
                me.CareerManager.LeaveAllJobs(Sims3.Gameplay.Careers.Career.LeaveJobReason.kDied);
            }

            urnstone.OnHandToolMovement();
            Urnstone.FinalizeSimDeath(me, originalHousehold);
            int num = ((int)Math.Floor((double)SimClock.ConvertFromTicks(SimClock.CurrentTime().Ticks, TimeUnit.Minutes))) % 60;
            urnstone.MinuteOfDeath = num;

            return urnstone;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:101,代码来源:Urnstones.cs

示例3: SimToPlayableGhost

        public static Urnstone SimToPlayableGhost(SimDescription me, SimDescription.DeathType deathType)
        {
            Urnstone urnstone = FindGhostsGrave(me);
            if (urnstone == null)
            {
                urnstone = PrivateCreateGrave(me);
                if (urnstone == null)
                {
                    return null;
                }
            }

            if (!Inventories.TryToMove(urnstone, me.CreatedSim))
            {
                MoveToMausoleum(urnstone);
            }

            me.IsGhost = true;
            me.SetDeathStyle(deathType, true);

            if (me.CreatedSim != null)
            {
                urnstone.GhostSetup(me.CreatedSim, true);
                if (!me.IsEP11Bot)
                {
                    me.AgingEnabled = true;
                    me.PushAgingEnabledToAgingManager();
                }
            }

            return urnstone;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:32,代码来源:Urnstones.cs


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