本文整理汇总了C#中GameObjects.GameObjectList.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# GameObjectList.Remove方法的具体用法?C# GameObjectList.Remove怎么用?C# GameObjectList.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.GameObjectList
的用法示例。
在下文中一共展示了GameObjectList.Remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildSectionByArchitectureList
private void BuildSectionByArchitectureList(GameObjectList architecturelist)
{
if (architecturelist.Count != 0)
{
Section section;
GameObjectList list;
if (architecturelist.Count == 1)
{
section = new Section();
section.ID = base.Scenario.Sections.GetFreeGameObjectID();
section.Scenario = base.Scenario;
this.AddSection(section);
base.Scenario.Sections.AddSectionWithEvent(section);
list = base.Scenario.GameCommonData.AllSectionAIDetails.GetSectionAIDetailsByConditions(SectionOrientationKind.无, true, false, true, true, false);
if (list.Count > 0)
{
section.AIDetail = list[GameObject.Random(list.Count)] as SectionAIDetail;
}
else
{
section.AIDetail = base.Scenario.GameCommonData.AllSectionAIDetails.GetSectionAIDetailList()[0] as SectionAIDetail;
}
section.AddArchitecture(architecturelist[0] as Architecture);
}
else
{
architecturelist.PropertyName = "Population";
architecturelist.IsNumber = true;
architecturelist.ReSort();
int count = 0;
int num2 = 2 + (this.ArchitectureCount / 8);
if (architecturelist.Count < ((num2 * 3) / 2))
{
count = architecturelist.Count;
}
else
{
count = num2;
}
section = new Section();
section.ID = base.Scenario.Sections.GetFreeGameObjectID();
section.Scenario = base.Scenario;
this.AddSection(section);
base.Scenario.Sections.AddSectionWithEvent(section);
list = base.Scenario.GameCommonData.AllSectionAIDetails.GetSectionAIDetailsByConditions(SectionOrientationKind.无, true, false, true, true, false);
if (list.Count > 0)
{
section.AIDetail = list[GameObject.Random(list.Count)] as SectionAIDetail;
}
else
{
section.AIDetail = base.Scenario.GameCommonData.AllSectionAIDetails.GetSectionAIDetailList()[0] as SectionAIDetail;
}
Architecture architecture = architecturelist[0] as Architecture;
section.AddArchitecture(architecture);
if (architecture.ClosestArchitectures == null)
{
architecture.GetClosestArchitectures();
}
if (architecture.AIAllLinkNodes.Count == 0)
{
architecture.GenerateAllAILinkNodes(2);
}
foreach (LinkNode node in architecture.AIAllLinkNodes.Values)
{
if (node.Level > 2)
{
break;
}
if ((node.A.BelongedFaction == this) && architecturelist.HasGameObject(node.A))
{
section.AddArchitecture(node.A);
}
if (section.ArchitectureCount >= count)
{
break;
}
}
if (count == architecturelist.Count)
{
if (section.ArchitectureCount < count)
{
foreach (Architecture architecture2 in section.Architectures)
{
architecturelist.Remove(architecture2);
}
if (this.SectionCount == 1)
{
foreach (Architecture architecture2 in architecturelist)
{
this.FirstSection.AddArchitecture(architecture2);
}
}
else
{
foreach (Architecture architecture2 in architecturelist)
{
int num3 = 0x7fffffff;
Section section2 = null;
foreach (Section section3 in this.Sections)
//.........这里部分代码省略.........