getCollision

abstract fun getCollision(x: Int, y: Int, width: Int, height: Int): Stream<Point2D>

获取当前实体指定区域内的碰撞信息。

坐标相对于当前实体,返回的 Stream 中可以包含指定区域外的部分。


open fun getCollision(rect: Rect2D): Stream<Point2D>

See also