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


C# Lot.EntryPoint方法代码示例

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


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

示例1: AttemptToFindSafeLocation

        public static Vector3 AttemptToFindSafeLocation(Lot lot, bool isHorse)
        {
            if (lot == null) return Vector3.Invalid;

            if (isHorse)
            {
                Mailbox mailbox = lot.FindMailbox();
                if (mailbox != null)
                {
                    return mailbox.Position;
                }
                else
                {
                    Door frontDoor = lot.FindFrontDoor();
                    if (frontDoor != null)
                    {
                        int roomId = frontDoor.GetRoomIdOfDoorSide(CommonDoor.tSide.Front);
                        if (roomId != 0)
                        {
                            roomId = frontDoor.GetRoomIdOfDoorSide(CommonDoor.tSide.Back);
                        }

                        if (roomId == 0)
                        {
                            List<GameObject> objects = lot.GetObjectsInRoom<GameObject>(roomId);
                            if (objects.Count > 0)
                            {
                                return RandomUtil.GetRandomObjectFromList(objects).Position;
                            }
                        }
                    }
                }
            }

            return lot.EntryPoint();
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:36,代码来源:Instantiation.cs

示例2: Perform

        public static Sim Perform(SimDescription ths, Lot lot, OnReset reset)
        {
            Vector3 result = Vector3.Invalid;
            if (lot != null)
            {
                result = AttemptToFindSafeLocation(lot, ths.IsHorse);
                if (result == Vector3.Invalid)
                {
                    result = lot.EntryPoint();
                }
            }
            else
            {
                result = GetPositionInRandomLot(lot);
            }

            return Perform(ths, result, null, reset);
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:18,代码来源:Instantiation.cs

示例3: GhostSpawn

        public static bool GhostSpawn(Urnstone me, Lot lot)
        {
            if (me.DeadSimsDescription == null)
            {
                return false;
            }

            if (!me.DeadSimsDescription.IsValidDescription)
            {
                me.DeadSimsDescription.Fixup();
            }

            Vector3 position;
            if (me.DeadSimsDescription.ToddlerOrBelow)
            {
                position = lot.EntryPoint();
            }
            else if (!me.InInventory)
            {
                position = me.Position;
            }
            else
            {
                position = Service.GetPositionInRandomLot(lot);
            }

            Household.NpcHousehold.Add(me.DeadSimsDescription);
            Sim sim = Instantiation.Perform(me.DeadSimsDescription, position, null, null);
            sim.SetOpacity(0f, 0f);

            ActiveTopic.AddToSim(sim, "Ghost");
            me.GhostSetup(sim, true);

            if (!me.InInventory)
            {
                sim.GreetSimOnLot(me.LotCurrent);
                Audio.StartObjectSound(me.ObjectId, "sting_ghost_appear", false);
            }

            sim.FadeIn();
            me.CreateAlarmReturnToGrave(false);
            return true;
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:43,代码来源:Urnstones.cs


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