12 lines
241 B
C#
12 lines
241 B
C#
using System.Numerics;
|
|
|
|
namespace PhysicsEngine
|
|
{
|
|
public static class GravityForce
|
|
{
|
|
public static void Apply(Body body, float dt)
|
|
{
|
|
body.ApplyForce(Vector2.UnitY * 9.81f/10 * body.Mass);
|
|
}
|
|
}
|
|
} |