Click or drag to resize
CollisionMask Class
Defines the shape of a sprite for the purpose of collision detection with other sprites
Inheritance Hierarchy
SystemObject
  (Default Namespace)CollisionMask

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public class CollisionMask

The CollisionMask type exposes the following members.

Constructors
  NameDescription
Public methodCollisionMask
Create a collision mask of the specified size for a combination of the specified frames from a frameset based on the respective alpha levels of those frames.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetRectangularMask
Retrieve a solid rectangular collision mask of the specified size
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodTestCollisionWith
Determine if this mask is colliding with the specified target mask
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
An instance of this object is associated with each sprite frame that contains any sub-frames with non-zero mask alpha levels. When testing for collisions between two sprites, if both sprites have a collision mask, the masks will be used to determine if "solid" pixels of the two sprites overlap.
See Also