class FlxVersion
package flixel.system
Static variables
Constructor
Variables
Methods
toString():String
Formats the version in the format "HaxeFlixel MAJOR.MINOR.PATCH-COMMIT_SHA", +
diff --git a/flixel/FlxCamera.html b/flixel/FlxCamera.html index b25cc48d50..89a1aa6c0d 100644 --- a/flixel/FlxCamera.html +++ b/flixel/FlxCamera.html @@ -69,10 +69,10 @@ screen coordinates.
4.3.0
.inlinecontainsRect(rect:FlxRect):Bool
Checks whether this camera contains a given rectangle, in screen coordinates.
4.11.0
.copyFrom(Camera:FlxCamera):FlxCamera
Copy the bounds, focus object, and deadzone
info from an existing camera.
Parameters:
Camera | The camera you want to copy from. |
---|
Returns:
A reference to this FlxCamera
object.
copyPixels(?frame:FlxFrame, ?pixels:BitmapData, ?sourceRect:Rectangle, destPoint:Point, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawPixels(?frame:FlxFrame, ?pixels:BitmapData, matrix:FlxMatrix, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawTriangles(graphic:FlxGraphic, vertices:DrawData<Float>, indices:DrawData<Int>, uvtData:DrawData<Float>, ?colors:DrawData<Int>, ?position:FlxPoint, ?blend:BlendMode, repeat:Bool = false, smoothing:Bool = false, ?transform:ColorTransform, ?shader:Null<FlxShader>):Void
fade(Color:FlxColor = FlxColor.BLACK, Duration:Float = 1, FadeIn:Bool = false, ?OnComplete:() ‑> Void, Force:Bool = false):Void
fill(Color:FlxColor, BlendAlpha:Bool = true, FxAlpha:Float = 1.0, ?graphics:Graphics):Void
Fill the camera with the specified color.
Parameters:
Color | The color to fill with in |
---|---|
BlendAlpha | Whether to blend the alpha value or just wipe the previous contents. Default is |
flash(Color:FlxColor = FlxColor.WHITE, Duration:Float = 1, ?OnComplete:() ‑> Void, Force:Bool = false):Void
The screen is filled with this color and gradually returns to normal.
Parameters:
Color | The color you want to use. |
---|---|
Duration | How long it takes for the flash to fade. |
OnComplete | A function you want to run when the flash finishes. |
Force | Force the effect to reset. |
inlinefocusOn(point:FlxPoint):Void
Move the camera focus to this location instantly.
Parameters:
Point | Where you want the camera to focus. |
---|
follow(Target:FlxObject, ?Style:FlxCameraFollowStyle, ?Lerp:Float):Void
Tells this camera object what FlxObject
to track.
Parameters:
Target | The object you want the camera to track. Set to |
---|---|
Style | Leverage one of the existing "deadzone" presets. Default is |
Lerp | How much lag the camera should have (can help smooth out the camera movement). |
getViewMarginRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
-and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
+and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
and viewHeight
.
Notes: Deprecated, in 4.11.0 this was made public, but the wording is confusing.
-In flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
+After flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
meaning, this will return the world coordinates of the camera.
4.11.0
.onResize():Void
Called by camera front end every time you resize the game. It triggers reposition of camera's internal display objects.
setFilters(filters:Array<BitmapFilter>):Void
Sets the filter array to be applied to the camera.
inlinesetPosition(X:Float = 0, Y:Float = 0):Void
Helper function to set the coordinates of this camera. Handy since it only requires one line of code.
Parameters:
X | The new x position. |
---|---|
Y | The new y position. |
setScale(X:Float, Y:Float):Void
Helper function to set the scale of this camera. diff --git a/flixel/addons/display/FlxShaderMaskCamera.html b/flixel/addons/display/FlxShaderMaskCamera.html index 6f1202d630..4a38b86066 100644 --- a/flixel/addons/display/FlxShaderMaskCamera.html +++ b/flixel/addons/display/FlxShaderMaskCamera.html @@ -75,10 +75,10 @@ screen coordinates.
4.3.0
.inlinecontainsRect(rect:FlxRect):Bool
Checks whether this camera contains a given rectangle, in screen coordinates.
4.11.0
.copyFrom(Camera:FlxCamera):FlxCamera
Copy the bounds, focus object, and deadzone
info from an existing camera.
Parameters:
Camera | The camera you want to copy from. |
---|
Returns:
A reference to this FlxCamera
object.
copyPixels(?frame:FlxFrame, ?pixels:BitmapData, ?sourceRect:Rectangle, destPoint:Point, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawPixels(?frame:FlxFrame, ?pixels:BitmapData, matrix:FlxMatrix, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawTriangles(graphic:FlxGraphic, vertices:DrawData<Float>, indices:DrawData<Int>, uvtData:DrawData<Float>, ?colors:DrawData<Int>, ?position:FlxPoint, ?blend:BlendMode, repeat:Bool = false, smoothing:Bool = false, ?transform:ColorTransform, ?shader:Null<FlxShader>):Void
fade(Color:FlxColor = FlxColor.BLACK, Duration:Float = 1, FadeIn:Bool = false, ?OnComplete:() ‑> Void, Force:Bool = false):Void
flash(Color:FlxColor = FlxColor.WHITE, Duration:Float = 1, ?OnComplete:() ‑> Void, Force:Bool = false):Void
The screen is filled with this color and gradually returns to normal.
Parameters:
Color | The color you want to use. |
---|---|
Duration | How long it takes for the flash to fade. |
OnComplete | A function you want to run when the flash finishes. |
Force | Force the effect to reset. |
inlinefocusOn(point:FlxPoint):Void
Move the camera focus to this location instantly.
Parameters:
Point | Where you want the camera to focus. |
---|
follow(Target:FlxObject, ?Style:FlxCameraFollowStyle, ?Lerp:Float):Void
Tells this camera object what FlxObject
to track.
Parameters:
Target | The object you want the camera to track. Set to |
---|---|
Style | Leverage one of the existing "deadzone" presets. Default is |
Lerp | How much lag the camera should have (can help smooth out the camera movement). |
getViewMarginRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
-and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
+and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
and viewHeight
.
Notes: Deprecated, in 4.11.0 this was made public, but the wording is confusing.
-In flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
+After flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
meaning, this will return the world coordinates of the camera.
4.11.0
.onResize():Void
Called by camera front end every time you resize the game. It triggers reposition of camera's internal display objects.
setFilters(filters:Array<BitmapFilter>):Void
Sets the filter array to be applied to the camera.
inlinesetPosition(X:Float = 0, Y:Float = 0):Void
Helper function to set the coordinates of this camera. Handy since it only requires one line of code.
Parameters:
X | The new x position. |
---|---|
Y | The new y position. |
setScale(X:Float, Y:Float):Void
Helper function to set the scale of this camera. diff --git a/flixel/addons/display/FlxZoomCamera.html b/flixel/addons/display/FlxZoomCamera.html index 0ba1733eb9..a8fea20819 100644 --- a/flixel/addons/display/FlxZoomCamera.html +++ b/flixel/addons/display/FlxZoomCamera.html @@ -58,10 +58,10 @@ screen coordinates.
4.3.0
.inlinecontainsRect(rect:FlxRect):Bool
Checks whether this camera contains a given rectangle, in screen coordinates.
4.11.0
.copyFrom(Camera:FlxCamera):FlxCamera
Copy the bounds, focus object, and deadzone
info from an existing camera.
Parameters:
Camera | The camera you want to copy from. |
---|
Returns:
A reference to this FlxCamera
object.
copyPixels(?frame:FlxFrame, ?pixels:BitmapData, ?sourceRect:Rectangle, destPoint:Point, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawPixels(?frame:FlxFrame, ?pixels:BitmapData, matrix:FlxMatrix, ?transform:ColorTransform, ?blend:BlendMode, smoothing:Bool = false, ?shader:Null<FlxShader>):Void
drawTriangles(graphic:FlxGraphic, vertices:DrawData<Float>, indices:DrawData<Int>, uvtData:DrawData<Float>, ?colors:DrawData<Int>, ?position:FlxPoint, ?blend:BlendMode, repeat:Bool = false, smoothing:Bool = false, ?transform:ColorTransform, ?shader:Null<FlxShader>):Void
fade(Color:FlxColor = FlxColor.BLACK, Duration:Float = 1, FadeIn:Bool = false, ?OnComplete:() ‑> Void, Force:Bool = false):Void
fill(Color:FlxColor, BlendAlpha:Bool = true, FxAlpha:Float = 1.0, ?graphics:Graphics):Void
Fill the camera with the specified color.
Parameters:
Color | The color to fill with in |
---|---|
BlendAlpha | Whether to blend the alpha value or just wipe the previous contents. Default is |
flash(Color:FlxColor = FlxColor.WHITE, Duration:Float = 1, ?OnComplete:() ‑> Void, Force:Bool = false):Void
The screen is filled with this color and gradually returns to normal.
Parameters:
Color | The color you want to use. |
---|---|
Duration | How long it takes for the flash to fade. |
OnComplete | A function you want to run when the flash finishes. |
Force | Force the effect to reset. |
inlinefocusOn(point:FlxPoint):Void
Move the camera focus to this location instantly.
Parameters:
Point | Where you want the camera to focus. |
---|
follow(Target:FlxObject, ?Style:FlxCameraFollowStyle, ?Lerp:Float):Void
Tells this camera object what FlxObject
to track.
Parameters:
Target | The object you want the camera to track. Set to |
---|---|
Style | Leverage one of the existing "deadzone" presets. Default is |
Lerp | How much lag the camera should have (can help smooth out the camera movement). |
getViewMarginRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
-and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
+and viewHeight
.
5.2.0
.getViewRect(?rect:FlxRect):FlxRect
The size and position of this camera's margins, via viewMarginLeft
, viewMarginTop
, viewWidth
and viewHeight
.
Notes: Deprecated, in 4.11.0 this was made public, but the wording is confusing.
-In flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
+After flixel 6.0.0 this will be changed to use viewX
, viewY
, viewWidth
and viewHeight
,
meaning, this will return the world coordinates of the camera.
4.11.0
.onResize():Void
Called by camera front end every time you resize the game. It triggers reposition of camera's internal display objects.
setFilters(filters:Array<BitmapFilter>):Void
Sets the filter array to be applied to the camera.
inlinesetPosition(X:Float = 0, Y:Float = 0):Void
Helper function to set the coordinates of this camera. Handy since it only requires one line of code.
Parameters:
X | The new x position. |
---|---|
Y | The new y position. |
setScale(X:Float, Y:Float):Void
Helper function to set the scale of this camera. diff --git a/flixel/addons/plugin/control/FlxControlHandler.html b/flixel/addons/plugin/control/FlxControlHandler.html index e9fbc69cde..119b352313 100644 --- a/flixel/addons/plugin/control/FlxControlHandler.html +++ b/flixel/addons/plugin/control/FlxControlHandler.html @@ -36,7 +36,7 @@ Gravity is given in pixels per second and is applied as acceleration. The speed the sprite reaches under gravity will never exceed the Maximum Movement Speeds set. If you don't want gravity for a specific direction pass a value of zero.
Parameters:
forceX | A positive value applies gravity dragging the sprite to the right. A negative value drags the sprite to the left. Zero disables horizontal gravity. |
---|---|
forceY | A positive value applies gravity dragging the sprite down. A negative value drags the sprite up. Zero disables vertical gravity. |
setHJKLControl(allowUp:Bool = true, allowDown:Bool = true, allowLeft:Bool = true, allowRight:Bool = true):Void
Enables HJKL (Rogue / Net-Hack) controls. Can be set on a per-key basis. Useful if you only want to allow a few keys. For example in a Space Invaders game you'd only enable LEFT and RIGHT.
Parameters:
allowUp | Enable the up (K) key |
---|---|
allowDown | Enable the down (J) key |
allowLeft | Enable the left (H) key |
allowRight | Enable the right (L) key |
setIJKLControl(allowUp:Bool = true, allowDown:Bool = true, allowLeft:Bool = true, allowRight:Bool = true):Void
Enables IJKL (right-sided or secondary player) controls. Can be set on a per-key basis. Useful if you only want to allow a few keys. -For example in a Space Invaders game you'd only enable LEFT and RIGHT.
Parameters:
allowUp | Enable the up (I) key |
---|---|
allowDown | Enable the down (K) key |
allowLeft | Enable the left (J) key |
allowRight | Enable the right (L) key |
setJumpButton(key:String, keymode:Int, height:Int, surface:Int, repeatDelay:Int = 250, jumpFromFall:Int = 0, ?callback:() ‑> Void, altKey:String = ""):Void
Enable a jump button
Parameters:
key | The key to use as the jump button (String from flixel.system.input.Keyboard, i.e. "SPACE", "CONTROL") |
---|---|
keymode | The FlxControlHandler KEYMODE value (KEYMODE_PRESSED, KEYMODE_JUST_DOWN, KEYMODE_RELEASED) |
height | The height in pixels/sec that the Sprite will attempt to jump (gravity and acceleration can influence this actual height obtained) |
surface | A bitwise combination of all valid surfaces the Sprite can jump off (such as FLOOR) |
repeatDelay | Time delay in ms between which the jumping can repeat (250 would be 4 times per second) |
jumpFromFall | A time in ms that allows the Sprite to still jump even if it's just fallen off a platform, if still within ths time limit |
callback | A user defined function to call when the Sprite jumps |
altKey | Specify an alternative jump key that works AS WELL AS the primary jump key (TODO) |
setMaximumRotationSpeed(speed:Float, limitVelocity:Bool = true):Void
Sets the maximum speed (in pixels per second) that the FlxSprite can rotate. +For example in a Space Invaders game you'd only enable LEFT and RIGHT.
Parameters:
allowUp | Enable the up (I) key |
---|---|
allowDown | Enable the down (K) key |
allowLeft | Enable the left (J) key |
allowRight | Enable the right (L) key |
setJumpButton(key:String, keymode:Int, height:Int, surface:FlxDirectionFlags, repeatDelay:Int = 250, jumpFromFall:Int = 0, ?callback:() ‑> Void, altKey:String = ""):Void
Enable a jump button
Parameters:
key | The key to use as the jump button (String from flixel.system.input.Keyboard, i.e. "SPACE", "CONTROL") |
---|---|
keymode | The FlxControlHandler KEYMODE value (KEYMODE_PRESSED, KEYMODE_JUST_DOWN, KEYMODE_RELEASED) |
height | The height in pixels/sec that the Sprite will attempt to jump (gravity and acceleration can influence this actual height obtained) |
surface | A bitwise combination of all valid surfaces the Sprite can jump off (such as FLOOR) |
repeatDelay | Time delay in ms between which the jumping can repeat (250 would be 4 times per second) |
jumpFromFall | A time in ms that allows the Sprite to still jump even if it's just fallen off a platform, if still within ths time limit |
callback | A user defined function to call when the Sprite jumps |
altKey | Specify an alternative jump key that works AS WELL AS the primary jump key (TODO) |
setMaximumRotationSpeed(speed:Float, limitVelocity:Bool = true):Void
Sets the maximum speed (in pixels per second) that the FlxSprite can rotate. When the FlxSprite is accelerating (movement type MOVEMENT_ACCELERATES) its speed won't increase above this value. However Flixel allows the velocity of an FlxSprite to be set to anything. So if you'd like to check the value and restrain it, then enable "limitVelocity".
Parameters:
speed | The maximum speed in pixels per second in which the sprite can rotate |
---|---|
limitVelocity | If true the angular velocity of the FlxSprite will be checked and kept within the limit. If false it can be set to anything. |
setMaximumSpeed(speedX:Int, speedY:Int, limitVelocity:Bool = true):Void
Sets the maximum speed (in pixels per second) that the FlxSprite can move. You can set the horizontal and vertical speeds independantly. When the FlxSprite is accelerating (movement type MOVEMENT_ACCELERATES) its speed won't increase above this value. diff --git a/flixel/system/FlxVersion.html b/flixel/system/FlxVersion.html index 4ad422b38b..13d5b646ac 100644 --- a/flixel/system/FlxVersion.html +++ b/flixel/system/FlxVersion.html @@ -7,6 +7,6 @@ float: none; text-shadow: 0 0 0 transparent; } -
toString():String
Formats the version in the format "HaxeFlixel MAJOR.MINOR.PATCH-COMMIT_SHA", +