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); }
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); }