本文整理汇总了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();
}
示例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);
}
示例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;
}