public void setEndPoint(Vector2 a_endPoint) { m_endPosition = new CartesianCoordinate(a_endPoint); m_endPosition.setParentPositionWithoutMoving(m_startPosition); m_endPosition.plusXWith(36); m_line.setEndPoint(m_endPosition); m_lenght = m_line.getStartPoint().getDistanceTo(m_line.getEndPoint()); }
public override void loadContent() { base.loadContent(); m_startPosition = m_position; m_endPosition = new CartesianCoordinate(m_position.getGlobalCartesianCoordinates() + new Vector2(0, (float)Math.Max(m_lenght,72))); m_endPosition.setParentPositionWithoutMoving(m_startPosition); m_line = new Line(m_startPosition, m_endPosition, new Vector2(36, 0), new Vector2(36, 0), Color.Black, 5, true); m_collisionShape = new CollisionRectangle(33, 0, 6, m_lenght, m_startPosition); m_rotationPoint.Y = 0; m_rotate = (float)Math.PI / 2; }
public override void loadContent() { base.loadContent(); m_startPosition = m_position; m_endPosition = new CartesianCoordinate(m_position.getGlobalCartesian() + new Vector2(0, (float)Math.Max(m_lenght, 72))); m_endPosition.setParentPositionWithoutMoving(m_startPosition); m_line = new Line(m_startPosition, m_endPosition, new Vector2(36, 0), new Vector2(36, 0), Color.Beige, 5, true); m_line.setTexture("Images/Automagi/wtfrope"); m_line.setLayer(m_layer); m_collisionShape = new CollisionLine(m_startPosition.getGlobalCartesian(), m_endPosition.getGlobalCartesian()); m_rotationPoint.Y = 0; m_rotate = (float)Math.PI / 2; }
public void setEndPoint(Position a_position) { m_endPosition = a_position; m_endPosition.setParentPositionWithoutMoving(m_startPosition); m_endPosition.plusXWith(36); m_line.setEndPoint(m_endPosition); m_lenght = m_line.getStartPoint().getDistanceTo(m_line.getEndPoint()); }