void Joint2D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { _update_joint(); } break; case NOTIFICATION_EXIT_TREE: { if (joint.is_valid()) { _update_joint(true); } } break; } }
void Joint2D::set_exclude_nodes_from_collision(bool p_enable) { if (exclude_from_collision==p_enable) return; exclude_from_collision=p_enable; _update_joint(); }
void Joint2D::set_node_b(const NodePath &p_node_b) { if (b == p_node_b) return; b = p_node_b; _update_joint(); }
void Joint2D::set_node_a(const NodePath &p_node_a) { if (a == p_node_a) return; a = p_node_a; _update_joint(); }
void Joint2D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_READY: { _update_joint(); } break; case NOTIFICATION_EXIT_TREE: { if (joint.is_valid()) { Physics2DServer::get_singleton()->free(joint); joint = RID(); } } break; } }