本文整理汇总了C#中IntVec3.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# IntVec3.ToString方法的具体用法?C# IntVec3.ToString怎么用?C# IntVec3.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IntVec3
的用法示例。
在下文中一共展示了IntVec3.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TreatIntrusion
public void TreatIntrusion(IntVec3 intrusionCell)
{
SetOutpostSecurityForcesHostileToColony();
string text = " MiningCo. security message broadcast\n\n" +
"Coralie here!\n" +
"I have detected an intrusion in sub-sector " + intrusionCell.ToString() + ".\n\n" +
"To all units in the sector, code Red is activated. All intruders are now priority targets.\n\n" +
"--- End of transmission ---";
Find.LetterStack.ReceiveLetter("Intrusion", text, LetterType.BadUrgent, new TargetInfo(intrusionCell));
}
示例2: AllowsPlacing
public override AcceptanceReport AllowsPlacing(BuildableDef checkingDef, IntVec3 loc, Rot4 rot)
{
ThingDef addonDef = (ThingDef)checkingDef;
if (addonDef == null)
{
return (AcceptanceReport)("MessagePlacementNotHere".Translate());
}
ThingWithComps addonsHost = (ThingWithComps)loc.GetThingList().Where(x => x.TryGetComp<CompAffectedByFacilities>() != null).FirstOrDefault();
if (addonsHost == null)
{
return (AcceptanceReport)("MessagePlacementNotHere".Translate());
}
ThingWithComps addonsCarrier = (ThingWithComps)loc.GetThingList().Where(x => x.TryGetComp<CompAddons>() != null).FirstOrDefault();
if (addonsCarrier != null)
{
return (AcceptanceReport)("MessagePlacementNotHere".Translate());
}
var thingDef = checkingDef as ThingDef;
if (thingDef != null && addonsHost!=null)
{
rot = addonsHost.Rotation;
CompProperties_Addons ProComp = thingDef.CompDefFor<CompAddons>() as CompProperties_Addons;
Log.Message("comprops" + ProComp.SlotNum);
if (ProComp != null)
{
if (ProComp.SlotNum >= 0)
{
List<IntVec3> VecList = new List<IntVec3>();
VecList = addonsHost.OccupiedRect().Cells.ToList();
int CalcCell = ProComp.SlotNum;
if (VecList.Count > 1)
{
if (addonsHost.Rotation == Rot4.North)
{
if (CalcCell + addonsHost.def.size.x <= VecList.Count)
{
CalcCell += addonsHost.def.size.x;
}
}
else if (addonsHost.Rotation == Rot4.West)
{
if (CalcCell + addonsHost.def.size.z <= VecList.Count)
{
CalcCell += addonsHost.def.size.z;
}
}
else if (addonsHost.Rotation == Rot4.East)
{
if (CalcCell + addonsHost.def.size.z >= 0)
{
CalcCell -= addonsHost.def.size.z;
}
}
}
if (VecList.ElementAt(CalcCell) == loc)
{
return AcceptanceReport.WasAccepted;
}
Log.Message("loc=" + loc.ToString());
}
}
}
return (AcceptanceReport)("MessagePlacementNotHere".Translate());
}