本文整理汇总了C#中ISpace.ConnectTwoWay方法的典型用法代码示例。如果您正苦于以下问题:C# ISpace.ConnectTwoWay方法的具体用法?C# ISpace.ConnectTwoWay怎么用?C# ISpace.ConnectTwoWay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISpace
的用法示例。
在下文中一共展示了ISpace.ConnectTwoWay方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Expand
public override void Expand(ISpace space, Point markedPoint, Point unmarkedPoint)
{
Point prev = markedPoint;
Point cur = unmarkedPoint;
ScreenConstructionParameters scp = new ScreenConstructionParameters(cur, TerminalName, m_fractalCreator);
space.AddScreen(scp, this.MissionNodeID);
space.ConnectTwoWay(prev, cur, Connection.Door);
for (int i = 1; i < m_length; ++i)
{
prev = cur;
cur = DirectionUtils.Move(cur, m_direction);
scp = new ScreenConstructionParameters(cur, TerminalName, m_fractalCreator);
space.AddScreen(scp, this.MissionNodeID);
space.ConnectTwoWay(prev, cur, Connection.Open);
if (i != m_length - 1)
{
Point side = DirectionUtils.Move(cur, m_direction.RotationCW);
space.ConnectOneWay(cur, side, Connection.Door);
side = DirectionUtils.Move(cur, m_direction.RotationCCW);
space.ConnectOneWay(cur, side, Connection.Door);
}
}
prev = cur;
//cur = m_direction.Move(cur, m_exitDir);
space.ConnectOneWay(prev, m_direction.Move(prev), Connection.Door);
space.ConnectOneWay(prev, m_direction.RotationCW.Move(prev), Connection.Door);
space.ConnectOneWay(prev, m_direction.RotationCCW.Move(prev), Connection.Door);
//space.ConnectOneWay(prev, cur, Connection.Door);
}
示例2: Expand
public override void Expand(ISpace space, Point markedPoint, Point unmarkedPoint)
{
Point prev = markedPoint;
Point cur = unmarkedPoint;
ScreenConstructionParameters scp = new ScreenConstructionParameters(cur, TerminalName, m_fractalCreator);
space.AddScreen(scp, this.MissionNodeID);
space.ConnectTwoWay(prev, cur, (Connection)space.GetConnection(prev, cur));
if (m_objectPopulators.Count >= 1) scp.ObjectPopulator = m_objectPopulators[0];
if (m_postProcessors.Count >= 1) scp.PostProcessor = m_postProcessors[0];
for (int i = 1; i < m_length; ++i)
{
prev = cur;
cur = DirectionUtils.Move(cur, m_bestEvaledDirection);
scp = new ScreenConstructionParameters(cur, TerminalName, m_fractalCreator);
space.AddScreen(scp, this.MissionNodeID);
space.ConnectTwoWay(prev, cur, Connection.Open);
if (m_objectPopulators.Count > i) scp.ObjectPopulator = m_objectPopulators[i];
if (m_postProcessors.Count > i) scp.PostProcessor = m_postProcessors[i];
}
prev = cur;
space.ConnectOneWay(prev, m_bestEvaledDirection.Move(prev), Connection.Door);
space.ConnectOneWay(prev, m_bestEvaledDirection.RotationCW.Move(prev), Connection.Door);
space.ConnectOneWay(prev, m_bestEvaledDirection.RotationCCW.Move(prev), Connection.Door);
}