Packagesekati.collisions
Classpublic class Collision

Collision provides the data associated with a DisplayObject collision.

See also

sekati.collisions.CollisionDetector
sekati.collisions.GroupCollisionDetector


Public Properties
 PropertyDefined by
  angle : Number
[read-only] The angle of the collision as radian or degree (only if returnAngle is set true, else -1 will be returned).
Collision
  object1 : DisplayObject
[read-only] The smaller object involved in the collision.
Collision
  object2 : DisplayObject
[read-only] The larger object involved in the collision.
Collision
  overlap : uint
[read-only] The pixel overlap between object1 & object2 during the collision.
Collision
Public Methods
 MethodDefined by
  
Collision(object1:DisplayObject, object2:DisplayObject, angle:Number, overlap:uint)
Collision Constructor
Collision
Property detail
angleproperty
angle:Number  [read-only]

The angle of the collision as radian or degree (only if returnAngle is set true, else -1 will be returned).

Implementation
    public function get angle():Number

See also

object1property 
object1:DisplayObject  [read-only]

The smaller object involved in the collision.

Implementation
    public function get object1():DisplayObject
object2property 
object2:DisplayObject  [read-only]

The larger object involved in the collision.

Implementation
    public function get object2():DisplayObject
overlapproperty 
overlap:uint  [read-only]

The pixel overlap between object1 & object2 during the collision.

Implementation
    public function get overlap():uint
Constructor detail
Collision()constructor
public function Collision(object1:DisplayObject, object2:DisplayObject, angle:Number, overlap:uint)

Collision Constructor

Parameters
object1:DisplayObject — The first object involved in the collision. This is always the smaller object of the two.
 
object2:DisplayObject — The second object involved in the collision. This is always the larger object of the two.
 
angle:Number — The angle of the collision. This is only returned if returnAngle is set to true; otherwise it will return -1.
 
overlap:uint — The pixel overlap between the two DisplayObject during the collision.