Circle

Circle

A simple circular hitbox. Remember that this circle describes the item as if its settings were x=0, y=0, scale=1, rotation=0.

Constructor

new Circle(radius, xopt, yopt)

Source:
Implements:
Parameters:
Name Type Attributes Default Description
radius number The radius of the circle.
x number <optional>
0 The x offset of the circle.
y number <optional>
0 The y offset of the circle.

Members

radius :number

Description:
  • The radius of the circle.
Source:
The radius of the circle.
Type:
  • number

x :number

Description:
  • The x coordinate of the circle.
Source:
The x coordinate of the circle.
Type:
  • number

y :number

Description:
  • The y coordinate of the circle.
Source:
The y coordinate of the circle.
Type:
  • number

Methods

contains(point) → {boolean}

Description:
  • Determines if a point is inside the circle.
Source:
Implements:
Parameters:
Name Type Description
point module:shared.Point2D The point to test.
Returns:
true if the point is inside the circle, false otherwise.
Type
boolean