@rtsdk/lance-topia
Version:
A Node.js based real-time multiplayer game server
23 lines (18 loc) • 602 B
JavaScript
// The base Physics Engine class defines the expected interface
// for all physics engines
export default class PhysicsEngine {
constructor(options) {
this.options = options;
this.gameEngine = options.gameEngine;
if (!options.gameEngine) {
console.warn('Physics engine initialized without gameEngine!');
}
}
/**
* A single Physics step.
*
* @param {Number} dt - time elapsed since last step
* @param {Function} objectFilter - a test function which filters which objects should move
*/
step(dt, objectFilter) {}
}