Class PhysicsEngine

java.lang.Object
io.github.espressoengine.physics.PhysicsEngine

public class PhysicsEngine extends Object

A simple 2D physics engine for JyGame.

Version:
$Id: $Id
Author:
pastthepixels
  • Field Details

  • Constructor Details

    • PhysicsEngine

      public PhysicsEngine()
  • Method Details

    • nextFrame

      public void nextFrame()
      Updates the physics engine to the "next frame". Needs to be called manually every loop.
    • add

      public void add(RigidBody object)

      Adds a RigidBody to the list of total bodies.

      Parameters:
      object - a RigidBody object
    • remove

      public void remove(RigidBody object)

      Removes a RigidBody from the list of total bodies.

      Parameters:
      object - a RigidBody object