本文整理汇总了C#中Thing.SetFactionDirect方法的典型用法代码示例。如果您正苦于以下问题:C# Thing.SetFactionDirect方法的具体用法?C# Thing.SetFactionDirect怎么用?C# Thing.SetFactionDirect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thing
的用法示例。
在下文中一共展示了Thing.SetFactionDirect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SpawnSetup
public override void SpawnSetup()
{
base.SpawnSetup();
// Initialize take-off tick.
takeOffTick = Find.TickManager.TicksGame + ressuplyDuration;
// Spawn cryptosleep bays.
if (this.cryptosleepBay1 == null)
{
cryptosleepBay1 = ThingMaker.MakeThing(OG_Util.SupplyShipCryptosleepBayLeftDef);
cryptosleepBay1.SetFactionDirect(this.Faction);
GenSpawn.Spawn(cryptosleepBay1, this.Position + new IntVec3(-4, 0, -2).RotatedBy(this.Rotation), this.Rotation);
}
if (this.cryptosleepBay2 == null)
{
cryptosleepBay2 = ThingMaker.MakeThing(OG_Util.SupplyShipCryptosleepBayRightDef);
cryptosleepBay2.SetFactionDirect(this.Faction);
GenSpawn.Spawn(cryptosleepBay2, this.Position + new IntVec3(3, 0, -2).RotatedBy(this.Rotation), this.Rotation);
}
// Spawn cargo bays.
if (this.cargoBay1 == null)
{
cargoBay1 = ThingMaker.MakeThing(OG_Util.SupplyShipCargoBayLeftDef);
cargoBay1.SetFactionDirect(this.Faction);
GenSpawn.Spawn(cargoBay1, this.Position + new IntVec3(-4, 0, 1).RotatedBy(this.Rotation), this.Rotation);
}
if (this.cargoBay2 == null)
{
cargoBay2 = ThingMaker.MakeThing(OG_Util.SupplyShipCargoBayRightDef);
cargoBay2.SetFactionDirect(this.Faction);
GenSpawn.Spawn(cargoBay2, this.Position + new IntVec3(4, 0, 1).RotatedBy(this.Rotation), this.Rotation);
}
}