UNPKG

complex-engine

Version:

JS Component Entity Framework for Gamedevelopment

95 lines (68 loc) 2.28 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Source: Scene.js</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Source: Scene.js</h1> <section> <article> <pre class="prettyprint source linenums"><code>import World from './World'; /** * The current scene with is rendered on screen. */ class Scene { /** * @param {string} name */ constructor(name) { /** @var {string} */ this.name = name; /** @var {World} */ this.world = new World(); } /** * Is called as soon you use this scene */ prepare(){ this.world.init(); this.load(); } /** * Called when the world is loaded by the ComplexCore. In this method your stage should be loaded/created * @abstract */ load() { } /** * Updates the world object */ update() { this.world.update(); } } export default Scene; </code></pre> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Component.html">Component</a></li><li><a href="Engine.html">Engine</a></li><li><a href="Entity.html">Entity</a></li><li><a href="EntitySystem.html">EntitySystem</a></li><li><a href="GroupManager.html">GroupManager</a></li><li><a href="Manager.html">Manager</a></li><li><a href="Scene.html">Scene</a></li><li><a href="System.html">System</a></li><li><a href="VoidSystem.html">VoidSystem</a></li><li><a href="World.html">World</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Sun Sep 08 2019 20:40:30 GMT+0200 (Central European Summer Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>