📜  2d 碰撞处理跳转表 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:47.706000             🧑  作者: Mango

代码示例1
void handle_mario_bumpable(object1 mario, object2 bumpable) { ... }void handle_mario_turtle(object1 mario, object2 turtle) { ... }void handle_mario_wall(object1 mario, object2 wall) { ... }...void handle_collision(object1 general_object, object2 general_object){    if object1.type == mario and object2.type == bumpable then handle_mario_bumpable(object1, object2)else     if object1.type == mario and object2.type == turtle then handle_mario_turtle(object1, object2)....}