本文整理汇总了C#中Server.MultiComponentList.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# MultiComponentList.Remove方法的具体用法?C# MultiComponentList.Remove怎么用?C# MultiComponentList.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.MultiComponentList
的用法示例。
在下文中一共展示了MultiComponentList.Remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetInitialState
public override void SetInitialState()
{
m_Current = new DesignState(this, GetEmptyFoundation());
// explicitly unused in StaticHousing
m_Design = null;
m_Backup = null;
//init the other two design states just so they don't crash the base's serilization
MultiComponentList y = new MultiComponentList(m_Current.Components);
MultiComponentList x = new MultiComponentList(StaticHouseHelper.GetComponents(m_HouseBlueprintID));
//merge x into y.
//first, remove all in y
for (int i = y.List.Length - 1; i >= 0; i--)
{
y.Remove(y.List[i].m_ItemID, y.List[i].m_OffsetX, y.List[i].m_OffsetY, y.List[i].m_OffsetZ);
}
//then add all the ones we want to the list
for (int i = 0; i < x.List.Length; ++i)
{
y.Add(x.List[i].m_ItemID, x.List[i].m_OffsetX, x.List[i].m_OffsetY, x.List[i].m_OffsetZ,true);
}
m_Current.Components = y;
return;
}