import { Font3D } from '../../font/3d'; import { State3D } from '../../state/3d'; import { System3D } from '../../system/3d'; import { UI3D } from '../../ui/3d'; import { World3D } from '../../world/3d'; import { Game } from '../game'; import { Game3DConfig } from './game.3d.config'; /** * Concrete Game3D object, setting out the 3D-specific properties and runtime behaviour of 3D Aura Games * * Implements and type-narrows the abstract elements of the parent class Game so as to produce consumer type-safety on things like * Game structure management and State lifecycle methods */ export declare class Game3D extends Game { /** Concrete 3D World */ readonly world: World3D; /** Concrete 3D Font */ readonly font: Font3D; /** Concrete 3D UI */ readonly ui: UI3D; /** Concrete mapping of 3D States */ protected readonly states: Map; /** Concrete reference to the current 3D State */ protected currentState: State3D | undefined; /** Concrete mapping of 3D Systems */ protected readonly systems: Map; /** * Constructor. Take an optional GameConfig3D, pass it up to the parent class, and then initialise all 3D-specific aspects of the Game * * @param config the optional GameConfig3D */ constructor(config?: Game3DConfig); /** * Concrete single State3D addition routine, narrowing the generic type to ensure the correct configuration of a Game3D * * @param state the State3D to add */ addState(state: State3D): void; /** * Concrete multi State3D addition routine, narrowing the generic type to ensure the correct configuration of a Game3D * * @param states the list of State3Ds to add */ addStates(...states: Array): void; /** * Concrete State init routine, ensuring that the State3D lifecycle method init() receives the type-correct Game3D */ initState(): void; /** * Concrete State end routine, ensuring that the State3D lifecycle method end() receives the type-correct Game3D */ endState(): void; /** * Concrete single System3D adition routine, narrowing the generic type to ensure the correct configuration of a Game3D * * @param system the System3D to add */ addSystem(system: System3D): void; /** * Concrete multi System3D addition routine, narrowing the generic type to ensure the correct configuration of a Game3D * * @param systems the list of System3Ds to add */ addSystems(...systems: Array): void; /** * Concrete frame update routine, ensuring that the System3D and State3D tick() lifecycle methods receive the type-correct Game3D * * Just updates all System3Ds and the current State3D */ protected update(): void; }