Package | org.flixel |
Class | public class FlxRect |
Inheritance | FlxRect Object |
Subclasses | FlxQuadTree |
Property | Defined By | ||
---|---|---|---|
bottom : Number [read-only]
The Y coordinate of the bottom of the rectangle. | FlxRect | ||
height : Number | FlxRect | ||
left : Number [read-only]
The X coordinate of the left side of the rectangle. | FlxRect | ||
right : Number [read-only]
The X coordinate of the right side of the rectangle. | FlxRect | ||
top : Number [read-only]
The Y coordinate of the top of the rectangle. | FlxRect | ||
width : Number | FlxRect | ||
x : Number | FlxRect | ||
y : Number | FlxRect |
Method | Defined By | ||
---|---|---|---|
FlxRect(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)
Instantiate a new rectangle. | FlxRect | ||
Helper function, just copies the values from the specified rectangle. | FlxRect | ||
copyFromFlash(FlashRect:Rectangle):FlxRect
Helper function, just copies the values from the specified Flash rectangle. | FlxRect | ||
Helper function, just copies the values from this rectangle to the specified rectangle. | FlxRect | ||
copyToFlash(FlashRect:Rectangle):Rectangle
Helper function, just copies the values from this rectangle to the specified Flash rectangle. | FlxRect | ||
Instantiate a new rectangle. | FlxRect | ||
Checks to see if some FlxRect object overlaps this FlxRect object. | FlxRect |
bottom | property |
bottom:Number
[read-only] The Y coordinate of the bottom of the rectangle. Read-only.
public function get bottom():Number
height | property |
public var height:Number
The default value is 0
.
left | property |
left:Number
[read-only] The X coordinate of the left side of the rectangle. Read-only.
public function get left():Number
right | property |
right:Number
[read-only] The X coordinate of the right side of the rectangle. Read-only.
public function get right():Number
top | property |
top:Number
[read-only] The Y coordinate of the top of the rectangle. Read-only.
public function get top():Number
width | property |
public var width:Number
The default value is 0
.
x | property |
public var x:Number
The default value is 0
.
y | property |
public var y:Number
The default value is 0
.
FlxRect | () | Constructor |
public function FlxRect(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0)
Instantiate a new rectangle.
ParametersX:Number (default = 0 ) — The X-coordinate of the point in space.
| |
Y:Number (default = 0 ) — The Y-coordinate of the point in space.
| |
Width:Number (default = 0 ) — Desired width of the rectangle.
| |
Height:Number (default = 0 ) — Desired height of the rectangle.
|
copyFrom | () | method |
public function copyFrom(Rect:FlxRect):FlxRect
Helper function, just copies the values from the specified rectangle.
Parameters
Rect:FlxRect — Any FlxRect .
|
FlxRect — A reference to itself.
|
copyFromFlash | () | method |
public function copyFromFlash(FlashRect:Rectangle):FlxRect
Helper function, just copies the values from the specified Flash rectangle.
Parameters
FlashRect:Rectangle — Any Rectangle .
|
FlxRect — A reference to itself.
|
copyTo | () | method |
public function copyTo(Rect:FlxRect):FlxRect
Helper function, just copies the values from this rectangle to the specified rectangle.
Parameters
Rect:FlxRect — Any FlxRect .
|
FlxRect — A reference to the altered rectangle parameter.
|
copyToFlash | () | method |
public function copyToFlash(FlashRect:Rectangle):Rectangle
Helper function, just copies the values from this rectangle to the specified Flash rectangle.
Parameters
FlashRect:Rectangle — Any Rectangle .
|
Rectangle — A reference to the altered rectangle parameter.
|
make | () | method |
public function make(X:Number = 0, Y:Number = 0, Width:Number = 0, Height:Number = 0):FlxRect
Instantiate a new rectangle.
Parameters
X:Number (default = 0 ) — The X-coordinate of the point in space.
| |
Y:Number (default = 0 ) — The Y-coordinate of the point in space.
| |
Width:Number (default = 0 ) — Desired width of the rectangle.
| |
Height:Number (default = 0 ) — Desired height of the rectangle.
|
FlxRect — A reference to itself.
|
overlaps | () | method |
public function overlaps(Rect:FlxRect):Boolean
Checks to see if some FlxRect
object overlaps this FlxRect
object.
Parameters
Rect:FlxRect — The rectangle being tested.
|
Boolean — Whether or not the two rectangles overlap.
|