code: function centerEntityOnPoint(game, entity, point) {
    var size = game.entities.getComponent(entity, "size");
    var position = game.entities.addComponent(entity, "position");
    position.x = point.x - (size.width / 2);
    position.y = point.y - (size.height / 2);
  }
docs: Center an entity on a given point.
  @private
  @param {object} game Required for game.entities.get().
  @param {integer} entity The id of entity to center.
  @param {object} point A point object <code>{"x": 50, "y": 50}</code> on which to center the entity.