C# Class fliXNA_xbox.FlxCamera

Inheritance: FlxBasic
Show file 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 property

protected Action,System _fxShakeComplete
return System.Action

_fxShakeDirection protected property

protected uint _fxShakeDirection
return uint

_fxShakeDuration protected property

protected float _fxShakeDuration
return float

_fxShakeIntensity protected property

protected float _fxShakeIntensity
return float

_fxShakeOffset protected property

protected FlxPoint _fxShakeOffset
return FlxPoint

_point protected property

protected FlxPoint _point
return FlxPoint

_zoom protected property

protected float _zoom
return float

angle protected property

protected float angle
return float

bounds public property

public FlxRect,fliXNA_xbox bounds
return FlxRect

deadzone public property

public FlxRect,fliXNA_xbox deadzone
return FlxRect

defaultZoom public static property

public static float defaultZoom
return float

effect public static property

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

height public property

public float height
return float

scroll public property

public FlxPoint scroll
return FlxPoint

target public property

public FlxObject,fliXNA_xbox target
return FlxObject

transform public property

public Matrix transform
return Matrix

width public property

public float width
return float

x public property

public float x
return float

y public property

public float y
return float