本文整理汇总了C#中IntVec3.GetRoof方法的典型用法代码示例。如果您正苦于以下问题:C# IntVec3.GetRoof方法的具体用法?C# IntVec3.GetRoof怎么用?C# IntVec3.GetRoof使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IntVec3
的用法示例。
在下文中一共展示了IntVec3.GetRoof方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsValidPositionToSpawnRefugeePod
public static bool IsValidPositionToSpawnRefugeePod(IntVec3 position)
{
ThingDef chunkDef = ThingDefOf.ShipChunk;
if ((position.InBounds() == false)
|| position.Fogged()
|| (position.Standable() == false)
|| (position.Roofed()
&& position.GetRoof().isThickRoof))
{
return false;
}
return true;
}
示例2: DoRoofPunch
// Punch the roof, if needed
public static void DoRoofPunch(IntVec3 position)
{
var roof = position.GetRoof();
// If there was actually a roof
if (roof != null)
{
// If we can punch through
if (!roof.soundPunchThrough.NullOrUndefined())
{
// Play punch sound
roof.soundPunchThrough.PlayOneShot(position);
}
// If the roof def is to leave filth
if (roof.filthLeaving != null)
{
// Drop some filth
for (var j = 0; j < 3; j++)
{
FilthMaker.MakeFilth(position, roof.filthLeaving);
}
}
}
}
示例3: IsValidPositionToSpawnShipChunk
public bool IsValidPositionToSpawnShipChunk(IntVec3 position)
{
ThingDef chunkDef = ThingDefOf.ShipChunk;
if ((position.InBounds() == false)
|| position.Fogged()
|| (position.Standable() == false)
|| (position.Roofed()
&& position.GetRoof().isThickRoof))
{
return false;
}
if (position.SupportsStructureType(chunkDef.terrainAffordanceNeeded) == false)
{
return false;
}
List<Thing> thingList = position.GetThingList();
for (int thingIndex = 0; thingIndex < thingList.Count; thingIndex++)
{
Thing thing = thingList[thingIndex];
if ((thing.def.category != ThingCategory.Plant)
&& GenSpawn.SpawningWipes(chunkDef, thing.def))
{
return false;
}
}
return true;
}