Kaboom - 是否有等效于触墙的 grounded() 属性?

Kaboom - Is there an equivalent of the grounded() attribute for touching a wall?

我正在努力做到这一点,以便我可以在我的游戏中跳墙,有没有一种方法可以检查一个对象是否正在接触另一个类似于 .grounded() 属性的物理对象的侧面?

类似这样的方法可能有效:

player.collides(
  'wall', // That's a tag.
  () => {
    // When player collides with anything tagged wall
  }
);

或者如果您想手动检查每一帧,

player.action(() => {
  if (player.isColliding(wall)) { // wall is a game object this time
    // When player collides with game object wall
  }
});