Skip to content
Snippets Groups Projects
Verified Commit e1b42630 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add types to Game class

parent 4d85bff2
No related branches found
No related tags found
No related merge requests found
Pipeline #7436 failed
......@@ -13,21 +13,24 @@
* limitations under the License.
*/
import Phaser from 'phaser';
import * as Phaser from 'phaser';
import SplashScene from './scenes/splash';
import LoginScene from './scenes/login';
import {BaseBackend} from '../backends/base'
import './game.css';
/** Main game class serving as frontend. */
class Game extends Phaser.Game {
backend: BaseBackend;
/**
* Construct a game instance linked to an already initialised backend.
*
* @param {object} backend - Reference to the backend instance
*/
constructor(backend) {
constructor(backend: BaseBackend) {
// Phaser configuration
const config = {
const config: Phaser.Types.Core.GameConfig = {
title: 'Aug[m]entile',
url: 'https://edugit.org/auglement/augmentile',
backgroundColor: 0xffb175,
......@@ -76,6 +79,8 @@ class Game extends Phaser.Game {
'message': error,
});
}
loadMap(mapData) {}
}
export default Game;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment