-
Notifications
You must be signed in to change notification settings - Fork 1
Physics.BallEntity
Matthew Daly edited this page Jan 3, 2023
·
5 revisions
Namespace: Verdant.Physics
public class BallEntity : PhysicsEntity
An Entity with a Circle body.
Navigate
public BallEntity(RenderObject sprite, Vec2 position, float radius, float mass) : base(sprite, position, (int)(radius * 2), (int)(radius * 2), mass)
Initialize a new BallEntity.
Parameter | Description |
---|---|
RenderObject sprite
|
The Entity's sprite. |
Vec2 position
|
The position of the center of the Entity. |
float radius
|
The radius of the Entity's Ball. Also used to determine rendering width and height by default. |
float mass
|
The mass of the Entity's Body. 0 = infinite mass. |
public void SimpleInput()
Move according to WASD input.
public override void Draw(SpriteBatch spriteBatch)
Parameter | Description |
---|---|
SpriteBatch spriteBatch
|
The Verdant wiki is automatically generated from documentation comments in the codebase by markify.