// // 在 ge_common.h 中定义通用碰撞类型 // typedef enum ge_collision_type { // GE_COLLISION_TYPE_BOX, // 实体间碰撞 // GE_COLLISION_TYPE_TILEMAP // 实体与瓦片地图碰撞 // } ge_collision_type_t; // // 通用碰撞数据结构 // typedef struct { // ge_collision_type_t type; // void* entityA; // 主要实体(通常是被检测的实体) // void* entityB; // 对于BOX碰撞,这是另一个实体;对于TILEMAP,这是瓦片地图 // ge_vector2i_t collision_point; // union { // struct { // int tile_x; // int tile_y; // } tilemap_data; // 瓦片地图碰撞特有数据 // struct { // // 可以添加实体间碰撞特有数据 // } box_data; // } specific; // } ge_collision_event_t; // // 碰撞回调函数类型 // typedef void (*ge_collision_callback_t)(ge_collision_event_t* event);