UNPKG

seed-engine

Version:

A Lightweight 2D game engine using WebGL2. The engine is designed on the focus of creating a bridge between creating and publishing games to the Seed Network as modules.

50 lines (43 loc) 822 B
'use-strict'; import EngineManager from './manager/EngineManager'; import Manager from './manager/Manager'; /** * Engine Singleton class. Entry point reference to access managers and * to start and stop the Engine. */ export class _Engine { /** * Engine Contstructor. */ constructor() { } /** * Starts the engine. */ start() { EngineManager.start(); } /** * Stops the engine and cleans up code. */ end() { EngineManager.end(); } /** * Pauses the entire engine. */ pause() { EngineManager.pause(); } /** * Resumes to the Engine. */ unpause() { EngineManager.unpause(); } } /** * Singleton reference to the Engine. */ const Engine = new _Engine(); export default Engine;