本文整理汇总了C#中Pawn.AwareOf方法的典型用法代码示例。如果您正苦于以下问题:C# Pawn.AwareOf方法的具体用法?C# Pawn.AwareOf怎么用?C# Pawn.AwareOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pawn
的用法示例。
在下文中一共展示了Pawn.AwareOf方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindClosestCorpseFor
public static Corpse FindClosestCorpseFor(Predicate<Thing> pred, Pawn getter)
{
Predicate<Thing> predicate1 = (Thing c) => !c.IsForbidden(Faction.OfColony) && getter.AwareOf(c) && getter.CanReserve(c);
Predicate<Thing> predicate = (Thing t) => pred(t) && predicate1(t);
ThingRequest thingReq = ThingRequest.ForGroup(ThingRequestGroup.Corpse);
return (Corpse)GenClosest.ClosestThingReachable(getter.Position, thingReq, PathEndMode.ClosestTouch, TraverseParms.For(getter), 9999f, predicate, null);
}
示例2: GetBestSeedThingForSowing
private Thing GetBestSeedThingForSowing( Pawn pawn, IntVec3 cell, ThingDef_PlantWithSeeds customPlantDef )
{
Thing seedThing = null;
Predicate<Thing> predicate = (Thing tempThing ) => !tempThing.IsForbidden( pawn.Faction ) && pawn.AwareOf( tempThing ) && pawn.CanReserve( tempThing);
if ( customPlantDef.SeedDef != null )
{
seedThing = GenClosest.ClosestThingReachable(cell, ThingRequest.ForDef(customPlantDef.SeedDef), PathEndMode.ClosestTouch,
TraverseParms.For( pawn ), 9999f, predicate );
}
return seedThing;
}