Source: wk/game/GameLoopEventDetail.js

/**
 * @author    Wolfgang Kowarschick <kowa@hs-augsburg.de>
 * @copyright 2017 - 2018
 * @license   CC-BY-NC-SA-4.0
 * @based_on  https://isaacsukin.com/news/2015/01/detailed-explanation-javascript-game-loops-and-timing
 */

/**
 * @class
 * @description
 * Objects of this class contain the details of events dispatched by
 * GameLoop objects.
 */
class GameLoopEventDetail
{ /**
   * @param {Object} p_detail
   * @property {string} p_detail.action        The action that has led to the state change.
   * @property {string} p_detail.state         The current state of the game loop.
   * @property {string} p_detail.previousState The previous state of the game loop.
   * @property {number} p_detail.ups           Model updates per second
   * @property {number} p_detail.fps           Frames per second
   */
   constructor(p_detail)
   { Object.assign(this, p_detail); }
}

export {GameLoopEventDetail};
export default GameLoopEventDetail;