You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub enum CollisionEvent {
/// Event occurring when two colliders start colliding
Started(ColliderHandle, ColliderHandle, CollisionEventFlags),
/// Event occurring when two colliders stop colliding.
Stopped(ColliderHandle, ColliderHandle, CollisionEventFlags),
}
I feel hard to use, cause a lot of duplicate code. like:
match e {
Started(handle1, handle2, flags) => {// logic with very little different},
Stopped(handle1, handle2, flags) => {// logic with very little different}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
current CollisonEvent is
I feel hard to use, cause a lot of duplicate code. like:
maybe this is better
Beta Was this translation helpful? Give feedback.
All reactions