Class BufferedSpriteCollider
Represents a behavior for creating a physics collider for 2D sprites using BulletSharp.
Inherited Members
Namespace: Genesis.Core.Behaviors.Physics2D
Assembly: Genesis.dll
Syntax
public class BufferedSpriteCollider : ColliderBehavior2D
Constructors
BufferedSpriteCollider(PhysicHandler)
Declaration
public BufferedSpriteCollider(PhysicHandler physicHandler)
Parameters
Type | Name | Description |
---|---|---|
PhysicHandler | physicHandler |
Methods
CreateCollider(int, int)
Creates a rigid body for the collider.
Declaration
public override void CreateCollider(int collisionGroup = -1, int collisionMask = -1)
Parameters
Type | Name | Description |
---|---|---|
int | collisionGroup | |
int | collisionMask |
Overrides
OnUpdate(Game, GameElement)
Updates the collider's position and rotation each frame.
Declaration
public override void OnUpdate(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
GameElement | parent | The parent game element. |