Package | verlocity.components |
Class | public final class verCamera |
Inheritance | verCamera Component Singleton Object |
Property | Defined By | ||
---|---|---|---|
brightness : Number
Returns the brightness of the camera. | verCamera | ||
className : Object [read-only]
Returns the class name of the component for
dictionary registration. | Component | ||
contrast : Number
Returns the contrast of the camera. | verCamera | ||
height : Number [read-only]
Returns the height of the camera. | verCamera | ||
hue : Number
Returns the hue of the camera. | verCamera | ||
IsEasing : Boolean [read-only]
Returns if the camera is easing. | verCamera | ||
IsEasingX : Boolean [read-only]
Returns if the camera is easing on the X axis. | verCamera | ||
IsEasingY : Boolean [read-only]
Returns if the camera is easing on the Y axis. | verCamera | ||
saturation : Number
Returns the saturation of the camera. | verCamera | ||
width : Number [read-only]
Returns the width of the camera. | verCamera | ||
x : Number
Returns the X position of the camera. | verCamera | ||
y : Number
Returns the Y position of the camera. | verCamera | ||
zoom : Number
Returns the zoom of the camera. | verCamera |
Method | Defined By | ||
---|---|---|---|
verCamera(sStage:Stage)
Constructor of the component. | verCamera | ||
_Destruct():void [override]
Destructor of the component. | verCamera | ||
_Get():Sprite
Returns the camera sprite
| verCamera | ||
_GetView():Shape
Returns the camera view area
| verCamera | ||
_IsNotUpdating():Boolean
Returns if the component is not updating (paused). | Component | ||
_IsValid():Boolean
Returns if this singleton is active/valid. | Singleton | ||
_SetUpdating(bUpdating:Boolean):void
Pauses/resumes the component updating, if it's pausable. | Component | ||
_UpdateComponent():void
Updates the component, if possible. | Component | ||
Add(disp:DisplayObject, bAddToBottom:Boolean = false):void
Adds a display object to the camera. | verCamera | ||
AdjustColors(nBrightness:Number, nContrast:Number, nHue:Number, nSaturation:Number):void | verCamera | ||
Follow(ent:DynamicEntity, iOffsetX:int = 0, iOffsetY:int = 0, bEase:Boolean = true, iEaseSpeed:int = 30):void
Sets the camera to follows an entity. | verCamera | ||
MoveTo(pPoint:Point, bEase:Boolean = true, iEaseSpeed:int = 30):void
Moves the camera to a specific point
| verCamera | ||
RemoveAll():void
Removes all display objects in the camera. | verCamera | ||
RemoveFilters():void
Removes all filters on the camera
| verCamera | ||
RemoveTint():void
Removes the tint of the camera
| verCamera | ||
Reset():void
Resets all the properties of the camera. | verCamera | ||
ResetColor():void
Resets the camera's color to its default
| verCamera | ||
ResetMask():void
Resets the masking to its default (ie. | verCamera | ||
ResetPos():void
Resets the camera's position to its default (0,0). | verCamera | ||
Rotate(nRot:Number):void
Rotates the camera around its center
| verCamera | ||
SetCenterPos(nPosX:Number, nPosY:Number):void
Centers the camera on a position. | verCamera | ||
SetColor(r:int, g:int, b:int, alpha:Number = 1):void
Sets the camera to a specific color
| verCamera | ||
SetLayer(sLayer:String):void
Sets the layer the camera is in. | verCamera | ||
SetMask(mask:DisplayObject):void
Sets the viewable mask of the camera
| verCamera | ||
SetMaskPos(iPosX:int, iPosY:int):void
Sets the position of the mask
| verCamera | ||
SetTint(amount:Number, r:int = 255, g:int = 255, b:int = 255):void
Sets the tint of the camera
| verCamera | ||
SetZoom(nSetZoom:Number):void
Zooms the camera
| verCamera | ||
Shake(iDuration:int, nForce:Number):void
Shakes the camera
| verCamera | ||
StopFollowing():void
Stops the camera from following an entity
| verCamera | ||
StopMoveTo():void
Stops moving the camera to a specific point (if MoveTo was called)
| verCamera | ||
StopShaking():void
Stop shaking the camera
| verCamera |
Method | Defined By | ||
---|---|---|---|
_Concommands():void [override]
Concommands of the component. | verCamera | ||
_Update():void [override]
Updates the camera
| verCamera |
brightness | property |
brightness:Number
Returns the brightness of the camera.
public function get brightness():Number
public function set brightness(value:Number):void
contrast | property |
contrast:Number
Returns the contrast of the camera.
public function get contrast():Number
public function set contrast(value:Number):void
height | property |
height:Number
[read-only] Returns the height of the camera.
public function get height():Number
hue | property |
hue:Number
Returns the hue of the camera.
public function get hue():Number
public function set hue(value:Number):void
IsEasing | property |
IsEasing:Boolean
[read-only] Returns if the camera is easing.
public function get IsEasing():Boolean
IsEasingX | property |
IsEasingX:Boolean
[read-only] Returns if the camera is easing on the X axis.
public function get IsEasingX():Boolean
IsEasingY | property |
IsEasingY:Boolean
[read-only] Returns if the camera is easing on the Y axis.
public function get IsEasingY():Boolean
saturation | property |
saturation:Number
Returns the saturation of the camera.
public function get saturation():Number
public function set saturation(value:Number):void
width | property |
width:Number
[read-only] Returns the width of the camera.
public function get width():Number
x | property |
x:Number
Returns the X position of the camera.
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
Returns the Y position of the camera.
public function get y():Number
public function set y(value:Number):void
zoom | property |
zoom:Number
Returns the zoom of the camera.
public function get zoom():Number
public function set zoom(value:Number):void
verCamera | () | Constructor |
public function verCamera(sStage:Stage)
Constructor of the component.
ParameterssStage:Stage |
_Concommands | () | method |
override protected function _Concommands():void
Concommands of the component.
_Destruct | () | method |
override public function _Destruct():void
Destructor of the component.
_Get | () | method |
public final function _Get():Sprite
Returns the camera sprite
ReturnsSprite —
|
_GetView | () | method |
public final function _GetView():Shape
Returns the camera view area
ReturnsShape —
|
_Update | () | method |
override protected function _Update():void
Updates the camera
Add | () | method |
public final function Add(disp:DisplayObject, bAddToBottom:Boolean = false):void
Adds a display object to the camera.
Parameters
disp:DisplayObject — The display object
| |
bAddToBottom:Boolean (default = false ) — Add to the bottom?
|
AdjustColors | () | method |
public final function AdjustColors(nBrightness:Number, nContrast:Number, nHue:Number, nSaturation:Number):void
Parameters
nBrightness:Number (default = NaN )
| |
nContrast:Number (default = NaN )
| |
nHue:Number (default = NaN )
| |
nSaturation:Number (default = NaN )
|
Follow | () | method |
public final function Follow(ent:DynamicEntity, iOffsetX:int = 0, iOffsetY:int = 0, bEase:Boolean = true, iEaseSpeed:int = 30):void
Sets the camera to follows an entity.
Parameters
ent:DynamicEntity — The dynamic entity to follow
| |
iOffsetX:int (default = 0 ) — Offset the camera
| |
iOffsetY:int (default = 0 ) — Offset the camera
| |
bEase:Boolean (default = true ) — Should the camera ease?
| |
iEaseSpeed:int (default = 30 ) — The speed the easing is preformed at
|
MoveTo | () | method |
public final function MoveTo(pPoint:Point, bEase:Boolean = true, iEaseSpeed:int = 30):void
Moves the camera to a specific point
Parameters
pPoint:Point — The point to move towards
| |
bEase:Boolean (default = true ) — Should the camera ease?
| |
iEaseSpeed:int (default = 30 ) — The speed at which the camera eases at
|
RemoveAll | () | method |
public final function RemoveAll():void
Removes all display objects in the camera.
RemoveFilters | () | method |
public final function RemoveFilters():void
Removes all filters on the camera
RemoveTint | () | method |
public final function RemoveTint():void
Removes the tint of the camera
Reset | () | method |
public final function Reset():void
Resets all the properties of the camera.
ResetColor | () | method |
public final function ResetColor():void
Resets the camera's color to its default
ResetMask | () | method |
public final function ResetMask():void
Resets the masking to its default (ie. removes custom mask)
ResetPos | () | method |
public final function ResetPos():void
Resets the camera's position to its default (0,0).
Rotate | () | method |
public final function Rotate(nRot:Number):void
Rotates the camera around its center
Parameters
nRot:Number — Degree to rotate
|
SetCenterPos | () | method |
public final function SetCenterPos(nPosX:Number, nPosY:Number):void
Centers the camera on a position.
Parameters
nPosX:Number — The X position
| |
nPosY:Number — The Y position
|
SetColor | () | method |
public final function SetColor(r:int, g:int, b:int, alpha:Number = 1):void
Sets the camera to a specific color
Parameters
r:int — Red
| |
g:int — Green
| |
b:int — Blue
| |
alpha:Number (default = 1 ) — Alpha
|
SetLayer | () | method |
public final function SetLayer(sLayer:String):void
Sets the layer the camera is in.
Parameters
sLayer:String |
SetMask | () | method |
public final function SetMask(mask:DisplayObject):void
Sets the viewable mask of the camera
Parameters
mask:DisplayObject — The mask
|
SetMaskPos | () | method |
public final function SetMaskPos(iPosX:int, iPosY:int):void
Sets the position of the mask
Parameters
iPosX:int | |
iPosY:int |
SetTint | () | method |
public final function SetTint(amount:Number, r:int = 255, g:int = 255, b:int = 255):void
Sets the tint of the camera
Parameters
amount:Number — Amount of tinting
| |
r:int (default = 255 ) — Red
| |
g:int (default = 255 ) — Green
| |
b:int (default = 255 ) — Blue
|
SetZoom | () | method |
public final function SetZoom(nSetZoom:Number):void
Zooms the camera
Parameters
nSetZoom:Number — Amount to zoom
|
Shake | () | method |
public final function Shake(iDuration:int, nForce:Number):void
Shakes the camera
Parameters
iDuration:int — Duration of the shake
| |
nForce:Number — The force of the shake
|
StopFollowing | () | method |
public final function StopFollowing():void
Stops the camera from following an entity
StopMoveTo | () | method |
public final function StopMoveTo():void
Stops moving the camera to a specific point (if MoveTo was called)
StopShaking | () | method |
public final function StopShaking():void
Stop shaking the camera