Свойство | Тип | Описание | |
---|---|---|---|
BgColor | Color | ||
Bounds | |||
Buffer | |||
Deadzone | |||
DefaultZoom | float | ||
FlashOffsetX | float | ||
FlashOffsetY | float | ||
FlashSprite | |||
Scroll | |||
Target | |||
screen | |||
transform | Matrix |
Свойство | Тип | Описание | |
---|---|---|---|
_color | Color | ||
_point | |||
_zoom | float | ||
fxFadeAlpha | float | ||
fxFadeColor | Color | ||
fxFadeComplete | System.Action | ||
fxFadeDuration | float | ||
fxFlashAlpha | float | ||
fxFlashColor | Color | ||
fxFlashComplete | System.Action | ||
fxFlashDuration | float | ||
fxShakeComplete | System.Action | ||
fxShakeDirection | uint | ||
fxShakeDuration | float | ||
fxShakeIntensity | float | ||
fxShakeOffset |
Свойство | Тип | Описание | |
---|---|---|---|
UpdateHelpers | void | ||
drawFX | void |
Метод | Описание | |
---|---|---|
Fade ( Color color, float duration = 1, System.Action onComplete = null, bool force = false ) : void |
The screen is gradually filled with this color.
|
|
Fill ( Color color, bool blendAlpha = true ) : void |
Fill the camera with the specified color.
|
|
Flash ( Color color, float duration = 1, System.Action onComplete = null, bool force = false ) : void |
The screen is filled with this color and gradually returns to normal.
|
|
FlxCamera ( float x, float y, int width, int height, float zoom ) : System |
Instantiates a new camera at the specified location, with the specified size and zoom level.
|
|
copyFrom ( |
Copy the bounds, focus object, and deadzone info from an existing camera.
|
|
destroy ( ) : void |
Clean up memory.
|
|
focusOn ( |
Move the camera focus to this location instantly.
|
|
follow ( |
Tells this camera object what
|
|
getContainerSprite ( ) : object |
Fetches a reference to the Flash
|
|
setBounds ( float x, float y, float width, float height, System.Boolean updateWorld = false ) : void |
Specify the boundaries of the level or where the camera is allowed to move.
|
|
shake ( float intensity = 0.05f, float duration = 0.5f, System.Action onComplete = null, bool force = true, uint direction = ShakeBothAxes ) : void |
A simple screen-shake effect.
|
|
stopFX ( ) : void |
Just turns off all the camera effects instantly.
|
|
update ( ) : void |
Updates the camera scroll as well as special effects like screen-shake or fades.
|
Метод | Описание | |
---|---|---|
UpdateHelpers ( ) : void | ||
drawFX ( ) : void |
Internal helper function, handles the actual drawing of all the special effects.
|
public Fade ( Color color, float duration = 1, System.Action onComplete = null, bool force = false ) : void | ||
color | Color | The color you want to use. |
duration | float | How long it takes for the fade to finish. |
onComplete | System.Action | A function you want to run when the fade finishes. |
force | bool | Force the effect to reset. |
Результат | void |
public Fill ( Color color, bool blendAlpha = true ) : void | ||
color | Color | The color to fill with in 0xAARRGGBB hex format. |
blendAlpha | bool | Whether to blend the alpha value or just wipe the previous contents. Default is true. |
Результат | void |
public Flash ( Color color, float duration = 1, System.Action onComplete = null, bool force = false ) : void | ||
color | Color | The color you want to use. |
duration | float | How long it takes for the flash to fade. |
onComplete | System.Action | A function you want to run when the flash finishes. |
force | bool | Force the effect to reset. |
Результат | void |
public FlxCamera ( float x, float y, int width, int height, float zoom ) : System | ||
x | float | X location of the camera's display in pixels. Uses native, 1:1 resolution, ignores zoom. |
y | float | Y location of the camera's display in pixels. Uses native, 1:1 resolution, ignores zoom. |
width | int | The width of the camera display in pixels. |
height | int | The height of the camera display in pixels. |
zoom | float | The initial zoom level of the camera. A zoom level of 2 will make all pixels display at 2x resolution. |
Результат | System |
public copyFrom ( |
||
camera | The camera you want to copy from. | |
Результат |
public focusOn ( |
||
point | Where you want the camera to focus. | |
Результат | void |
public follow ( |
||
target | The object you want the camera to track. Set to null to not follow anything. | |
style | uint | Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow() . |
Результат | void |
public setBounds ( float x, float y, float width, float height, System.Boolean updateWorld = false ) : void | ||
x | float | The smallest X value of your level (usually 0). |
y | float | The smallest Y value of your level (usually 0). |
width | float | The largest X value of your level (usually the level width). |
height | float | The largest Y value of your level (usually the level height). |
updateWorld | System.Boolean | Whether the global quad-tree's dimensions should be updated to match (default: false). |
Результат | void |
public shake ( float intensity = 0.05f, float duration = 0.5f, System.Action onComplete = null, bool force = true, uint direction = ShakeBothAxes ) : void | ||
intensity | float | Percentage of screen size representing the maximum distance that the screen can move while shaking. |
duration | float | The length in seconds that the shaking effect should last. |
onComplete | System.Action | A function you want to run when the shake effect finishes. |
force | bool | Force the effect to reset (default = true, unlike flash() and fade()!). |
direction | uint | Whether to shake on both axes, just up and down, or just side to side (use class constants SHAKE_BOTH_AXES, SHAKE_VERTICAL_ONLY, or SHAKE_HORIZONTAL_ONLY). |
Результат | void |
public RenderTarget2D,Microsoft.Xna.Framework.Graphics Buffer | ||
Результат |
protected FlxPoint,flxSharp.flxSharp fxShakeOffset | ||
Результат |