예제 #1
0
        private String get_nodes_connections(Figure_representation representation)
        {
            StringBuilder result = new StringBuilder();

            foreach (Subfigure subfigure in representation.get_subfigures())
            {
                write_next_nodes_for(subfigure, result);
            }
            return(result.ToString());
        }
예제 #2
0
        private void check_clicking_on_connection()
        {
            foreach (Subfigure origin_subfigure in built_repr.get_subfigures())
            {
                foreach (Subfigure next_subfigure in origin_subfigure.next)
                {
                    Vector3 closest_point;
                    float   distance = Distance_from_point_to_line.get_distance(
                        Unity_input.instance.mouse_world_position,
                        origin_subfigure.transform.position,
                        next_subfigure.transform.position,
                        out closest_point
                        );

                    if (distance < connection_width)
                    {
                        select(
                            origin_subfigure.get_connection_to_next(next_subfigure)
                            );
                    }
                }
            }
        }