C# Class fliXNA_xbox.FlxCamera

Inheritance: FlxBasic
Exibir arquivo Open project: bpercevic/flixel-XNA Class Usage Examples

Public Properties

Property Type Description
bounds FlxRect
deadzone FlxRect
defaultZoom float
effect Microsoft.Xna.Framework.Graphics.Effect
height float
scroll FlxPoint
target FlxObject
transform Matrix
width float
x float
y float

Protected Properties

Property Type Description
_fxShakeComplete System.Action
_fxShakeDirection uint
_fxShakeDuration float
_fxShakeIntensity float
_fxShakeOffset FlxPoint
_point FlxPoint
_zoom float
angle float

Private Properties

Property Type Description

Public Methods

Method Description
FlxCamera ( float X, float Y, float Width, float Height, float Zoom = 1.0f ) : System
focusOn ( FlxPoint Point ) : void

Shift the camera's focus onto a specific point in the game-world.

follow ( FlxObject Target, uint Style = STYLE_LOCKON ) : void

Make the camera follow an object with a specified follow-style

setBounds ( float X, float Y, float Width, float Height, System.Boolean UpdateWorld = false ) : void

Set the boundaries of the camera. Useful for preventing the camera from scrolling past the edge of a map.

shake ( float Intensity = 0.05f, float Duration = 0.5f, System.Action OnComplete = null, bool Force = true, uint Direction = SHAKE_BOTH_AXES ) : void

Shake the screen

stopFX ( ) : void

Internal function for stopping any effects, can be called manually

update ( ) : void

Method Details

FlxCamera() public method

public FlxCamera ( float X, float Y, float Width, float Height, float Zoom = 1.0f ) : System
X float
Y float
Width float
Height float
Zoom float
return System

focusOn() public method

Shift the camera's focus onto a specific point in the game-world.
public focusOn ( FlxPoint Point ) : void
Point FlxPoint
return void

follow() public method

Make the camera follow an object with a specified follow-style
public follow ( FlxObject Target, uint Style = STYLE_LOCKON ) : void
Target FlxObject
Style uint
return void

setBounds() public method

Set the boundaries of the camera. Useful for preventing the camera from scrolling past the edge of a map.
public setBounds ( float X, float Y, float Width, float Height, System.Boolean UpdateWorld = false ) : void
X float
Y float
Width float
Height float
UpdateWorld System.Boolean
return void

shake() public method

Shake the screen
public shake ( float Intensity = 0.05f, float Duration = 0.5f, System.Action OnComplete = null, bool Force = true, uint Direction = SHAKE_BOTH_AXES ) : void
Intensity float
Duration float
OnComplete System.Action
Force bool
Direction uint
return void

stopFX() public method

Internal function for stopping any effects, can be called manually
public stopFX ( ) : void
return void

update() public method

public update ( ) : void
return void

Property Details

_fxShakeComplete protected_oe property

protected Action,System _fxShakeComplete
return System.Action

_fxShakeDirection protected_oe property

protected uint _fxShakeDirection
return uint

_fxShakeDuration protected_oe property

protected float _fxShakeDuration
return float

_fxShakeIntensity protected_oe property

protected float _fxShakeIntensity
return float

_fxShakeOffset protected_oe property

protected FlxPoint _fxShakeOffset
return FlxPoint

_point protected_oe property

protected FlxPoint _point
return FlxPoint

_zoom protected_oe property

protected float _zoom
return float

angle protected_oe property

protected float angle
return float

bounds public_oe property

public FlxRect,fliXNA_xbox bounds
return FlxRect

deadzone public_oe property

public FlxRect,fliXNA_xbox deadzone
return FlxRect

defaultZoom public_oe static_oe property

public static float defaultZoom
return float

effect public_oe static_oe property

public static Effect,Microsoft.Xna.Framework.Graphics effect
return Microsoft.Xna.Framework.Graphics.Effect

height public_oe property

public float height
return float

scroll public_oe property

public FlxPoint scroll
return FlxPoint

target public_oe property

public FlxObject,fliXNA_xbox target
return FlxObject

transform public_oe property

public Matrix transform
return Matrix

width public_oe property

public float width
return float

x public_oe property

public float x
return float

y public_oe property

public float y
return float