Skip to content

Instantly share code, notes, and snippets.

@Fishrock123

Fishrock123/entity.js Secret

Created Jun 25, 2014
Embed
What would you like to do?
var inherits = require('./shared/inherits')
, p2 = require('../vendor/p2')
function Entity(options) {
p2.Body.call(this, options)
this.mass = 1
this.motionState = p2.Body.DYNAMIC
this.game = options.game
this.exists = false
this.lifespan = 0
}; inherits(Entity, p2.Body)
Entity.prototype.tick = function(delta, game) {}
module.exports = Entity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.