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 : PhysicsBehavior
Constructors
BufferedSpriteCollider()
Declaration
public BufferedSpriteCollider()
Properties
AngularFactor
Gets or sets the angular factor for the RigidBody's rotation.
Declaration
public Vec3 AngularFactor { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
LinearFactor
Gets or sets the linear factor for the RigidBody's motion.
Declaration
public Vec3 LinearFactor { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
RigidBody
Gets or sets the rigid body associated with the collider.
Declaration
public RigidBody RigidBody { get; set; }
Property Value
Type | Description |
---|---|
RigidBody |
Methods
CreateRigidBody(float, PhysicHandler)
Creates a rigid body for the collider.
Declaration
public void CreateRigidBody(float mass, PhysicHandler handler)
Parameters
Type | Name | Description |
---|---|---|
float | mass | The mass of the rigid body. |
PhysicHandler | handler | The physics handler for managing the collider. |
GetPhysicsObject()
Gets the physics object associated with the collider.
Declaration
public override object GetPhysicsObject()
Returns
Type | Description |
---|---|
object | The rigid body associated with the collider. |
Overrides
GetPhysicsObject<T>()
Gets the typed physics object associated with the collider.
Declaration
public override T GetPhysicsObject<T>()
Returns
Type | Description |
---|---|
T | The typed rigid body associated with the collider. |
Type Parameters
Name | Description |
---|---|
T | Type of the physics object. |
Overrides
OnDestroy(Game, GameElement)
Placeholder for OnDestroy event. No implementation.
Declaration
public override void OnDestroy(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | |
GameElement | parent |
Overrides
OnInit(Game, GameElement)
Placeholder for OnInit event. No implementation.
Declaration
public override void OnInit(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | |
GameElement | parent |
Overrides
OnRender(Game, GameElement)
Placeholder for OnRender event. No implementation.
Declaration
public override void OnRender(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | |
GameElement | parent |
Overrides
OnUpdate(Game, GameElement)
Placeholder for OnUpdate event. No implementation.
Declaration
public override void OnUpdate(Game game, GameElement parent)
Parameters
Type | Name | Description |
---|---|---|
Game | game | |
GameElement | parent |