Package | org.rapidphysics |
Class | public class RapidText |
Inheritance | RapidText ![]() ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | acceleration : Point
Mess with this in your update loop
| RapidObject | |
![]() | active : Boolean | RapidBasic | |
alignment : String [read-only]
The alignment of the font ("left", "right", or "center"). | RapidText | ||
![]() | center : Point
Relative to (x,y)
| RapidObject | |
![]() | exists : Boolean | RapidBasic | |
![]() | fillColor : uint | RapidObject | |
![]() | fixed : Boolean = false
Set to true to prevent this object from moving
| RapidObject | |
font : String [read-only]
The font used for this text. | RapidText | ||
![]() | height : Number
Depending on the shape, height can totally be negative!
| RapidObject | |
![]() | lineColor : uint
0xRRGGBB
| RapidObject | |
![]() | maxVelocity : Point | RapidObject | |
![]() | nextPosition : Point | RapidObject | |
![]() | nextVelocity : Point | RapidObject | |
![]() | nextX : Number | RapidObject | |
![]() | nextY : Number | RapidObject | |
![]() | position : Point | RapidObject | |
![]() | predictMotionFunction : Function
I wrote some code to allow dynamic changes between Euler integration and Verlet integration. | RapidObject | |
![]() | prevX : Number | RapidObject | |
![]() | prevY : Number | RapidObject | |
![]() | radians : Number | RapidObject | |
![]() | shape : Shape | RapidObject | |
size : Number [read-only]
The size of the text being displayed. | RapidText | ||
text : String
The text being displayed. | RapidText | ||
textField : TextField [read-only] | RapidText | ||
![]() | thickness : Number = 1 | RapidObject | |
![]() | velocity : Point
Mess with this in your update loop
| RapidObject | |
![]() | visible : Boolean | RapidBasic | |
![]() | width : Number
Depending on the shape, width can totally be negative!
| RapidObject | |
![]() | x : Number | RapidObject | |
![]() | y : Number | RapidObject |
Property | Defined By | ||
---|---|---|---|
![]() | alpha : Number | RapidObject | |
![]() | _point : Point
General usage
| RapidObject | |
_textField : TextField
Internal reference to a Flash TextField object. | RapidText |
Method | Defined By | ||
---|---|---|---|
RapidText(X:Number, Y:Number, Width:uint, Text:String = null, EmbeddedFont:Boolean = true)
Creates a new FlxText object at the specified position. | RapidText | ||
![]() | debugDraw():void [override] | RapidObject | |
destroy():void [override]
Clean up memory. | RapidText | ||
![]() | draw():void [override] | RapidObject | |
![]() | postUpdate():void [override]
Predicts where this object will be by the next preUpdate()
Provides enough information to draw physics information, and resolve collisions
| RapidObject | |
![]() | preDraw():void [override] | RapidObject | |
![]() | preUpdate():void [override]
Occurs right after collision resolution
Set x to nextX, etc etc
| RapidObject | |
![]() | reset(X:Number, Y:Number):void | RapidObject | |
setFormat(Font:String = null, Size:Number = 12, Color:uint = 0xffffff, Alignment:String = null):RapidText
You can use this if you have a lot of text parameters
to set instead of the individual properties. | RapidText | ||
![]() | setIntegrationMethod(method:Number):void
takes RapidG.INTEGRATION_EULER, etc. | RapidObject | |
![]() | update():void [override]
Add your game's update logic here
| RapidObject |
_textField | property |
protected var _textField:TextField
Internal reference to a Flash TextField
object.
alignment | property |
alignment:String
[read-only] The alignment of the font ("left", "right", or "center").
public function get alignment():String
font | property |
font:String
[read-only] The font used for this text.
public function get font():String
size | property |
size:Number
[read-only] The size of the text being displayed.
public function get size():Number
text | property |
text:String
The text being displayed.
public function get text():String
public function set text(value:String):void
textField | property |
textField:TextField
[read-only] public function get textField():TextField
RapidText | () | Constructor |
public function RapidText(X:Number, Y:Number, Width:uint, Text:String = null, EmbeddedFont:Boolean = true)
Creates a new FlxText
object at the specified position.
X:Number — The X position of the text.
| |
Y:Number — The Y position of the text.
| |
Width:uint — The width of the text object (height is determined automatically).
| |
Text:String (default = null ) — The actual text you would like to display initially.
| |
EmbeddedFont:Boolean (default = true ) — Whether this text field uses embedded fonts or nto
|
destroy | () | method |
override public function destroy():void
Clean up memory.
setFormat | () | method |
public function setFormat(Font:String = null, Size:Number = 12, Color:uint = 0xffffff, Alignment:String = null):RapidText
You can use this if you have a lot of text parameters to set instead of the individual properties.
Parameters
Font:String (default = null ) — The name of the font face for the text display.
| |
Size:Number (default = 12 ) — The size of the font (in pixels essentially).
| |
Color:uint (default = 0xffffff ) — The color of the text in traditional flash 0xRRGGBB format.
| |
Alignment:String (default = null ) — A string representing the desired alignment ("left,"right" or "center").
|
RapidText — This FlxText instance (nice for chaining stuff together, if you're into that).
|