interface IHitArea {
    contains(x: number, y: number, sp: Sprite): boolean;
}

实现于

方法

方法

  • 参数

    • x: number

      The x-coordinate of the point (horizontal position).

    • y: number

      The y-coordinate of the point (vertical position).

    • sp: Sprite

      The Sprite object that contains the point.

    返回 boolean

    true if the object contains the specified point; otherwise false.

    Checks whether the object contains a specified point.

    检测对象是否包含指定的点。