Packageorg.rapidphysics
Classpublic class RapidSim
InheritanceRapidSim Inheritance flash.display.Sprite
Subclasses RapidPhysics

This is a top-level class that runs a rapid physics simulation.



Protected Properties
 PropertyDefined By
  _total : uint
Total number of milliseconds elapsed since game start.
RapidSim
Public Methods
 MethodDefined By
  
RapidSim(initState:Class, frameRate:Number, width:Number, height:Number)
RapidSim
  
switchWorld(world:Class):void
Switch physics worlds here
RapidSim
Protected Methods
 MethodDefined By
  
onAddedToStage(e:Event):void
RapidSim
  
onEnterFrame(e:Event):void
Heavy lifting of the simulation run
RapidSim
  
onKeyDown(FlashEvent:KeyboardEvent):void
Internal event handler for input and focus.
RapidSim
  
onKeyUp(FlashEvent:KeyboardEvent):void
RapidSim
  
step():void
RapidSim
  
RapidSim
Property Detail
_totalproperty
protected var _total:uint

Total number of milliseconds elapsed since game start.

Constructor Detail
RapidSim()Constructor
public function RapidSim(initState:Class, frameRate:Number, width:Number, height:Number)

Parameters
initState:Class
 
frameRate:Number
 
width:Number
 
height:Number
Method Detail
onAddedToStage()method
protected function onAddedToStage(e:Event):void

Parameters

e:Event

onEnterFrame()method 
protected function onEnterFrame(e:Event):void

Heavy lifting of the simulation run

Parameters

e:Event

onKeyDown()method 
protected function onKeyDown(FlashEvent:KeyboardEvent):void

Internal event handler for input and focus.

Parameters

FlashEvent:KeyboardEvent — Flash keyboard event.

onKeyUp()method 
protected function onKeyUp(FlashEvent:KeyboardEvent):void

Parameters

FlashEvent:KeyboardEvent

step()method 
protected function step():void

switchWorld()method 
public function switchWorld(world:Class):void

Switch physics worlds here

Parameters

world:Class

updateInput()method 
protected function updateInput():void