Class Bounded
Defined in: gamelib.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Bounded()
The Bounded module is used to provide basic data about the
location and dimensions of the including object
Bounded module
|
Method Attributes | Method Name and Description |
---|---|
bounds(xOffset, yOffset)
The bounds method returns infomation about the location
of the object and its dimensions with optional offsets
|
|
<static> |
Bounded.bounds(xOffset, yOffset)
|
<static> |
Bounded.center()
|
center()
The center method returns the Point that is
the center of the object
|
|
The centeredBounds method returns infomation about the center
of the object along with the midpoint of the width and height
|
|
<static> |
Bounded.centeredBounds()
|
Method Detail
bounds(xOffset, yOffset)
The bounds method returns infomation about the location
of the object and its dimensions with optional offsets
- Parameters:
- {number} xOffset
- the amount to shift the x position
- {number} yOffset
- the amount to shift the y position
<static>
Bounded.bounds(xOffset, yOffset)
- Parameters:
- xOffset
- yOffset
<static>
Bounded.center()
center()
The center method returns the Point that is
the center of the object
centeredBounds()
The centeredBounds method returns infomation about the center
of the object along with the midpoint of the width and height
<static>
Bounded.centeredBounds()