bp-prism-game
Version:
The BP Prism Game
199 lines (198 loc) • 4.33 kB
TypeScript
import { ElementRef, OnInit, OnDestroy } from '@angular/core';
import { GameService } from '../service/game.service';
import { GameCookieService } from '../service/game-cookie.service';
import { DisplayDialogService } from '../service/display-dialog.service';
import { MatDialog } from '@angular/material/dialog';
import { GameConfigurationModel } from '../model/game-configuration.model';
import * as i0 from "@angular/core";
/**
* The Gameboard Component
*/
export declare class GameboardComponent implements OnInit, OnDestroy {
private dialog;
private displayDialogService;
private gameConfiguration;
private gameCookieService;
private gameService;
/**
* Display Grid
*/
/**
* The canvas
*/
canvas: ElementRef<HTMLCanvasElement>;
/**
* The Subscription
*/
private subscription;
/**
* Canvas Rendering Context 2D
*/
private ctx;
/**
* The animation request id
*/
private requestId;
/**
* The points
*/
private points;
/**
* The highscore
*/
private highScore;
/**
* The high level
*/
private highLevel;
/**
* Paused
*/
private isGamePaused;
/**
* Game Started;
*/
gameStarted: boolean;
/**
* Scenery Service
*/
private sceneryService;
/**
* Invasion Service
*/
private invasionService;
/**
* Prism Base
*/
private prismBase;
/**
* Main Gunner
*/
private mainGunner;
/**
* Missile Service
*/
private missileService;
/**
* Gameboard Service
*/
private gameboardService;
/**
* Game Level
*/
private gameLevel;
/**
* The displayLevel
*/
private displayLevel;
/**
* Text Service
*/
private textService;
/**
* Board Size
*/
private boardSize;
/**
* Prism Blast Service
*/
private prismBlastService;
/**
* The Constructor
*
* @param dialog The MatDialog from DI
* @param displayDialogService The Display Dialog Service from DI
* @param gameConfigurationService The Game Configuration Data from DI
* @param gameCookieService The Game Cookie Service from DI
* @param gameService The Game Service from DI
*/
constructor(dialog: MatDialog, displayDialogService: DisplayDialogService, gameConfiguration: GameConfigurationModel, gameCookieService: GameCookieService, gameService: GameService);
/**
* On Init
*/
ngOnInit(): void;
/**
* On Destroy
*/
ngOnDestroy(): void;
/**
* Setup the game board
*/
private setUpGameBoard;
/**
* Add a new prism blast every 1000 points
*/
private addNewPrismBlast;
/**
* Evaluate high Score
*/
private calculateScore;
/**
* Evaluate any damage
*/
private evaluateDamage;
/**
* Start All the animation in one place
*/
private startAllAnimation;
/**
* Animate
*
* @param now The current animation time
*/
private animate;
/**
* Determine if the game is over
*
*/
gameOver(): void;
/**
* Draw the board
*/
private draw;
/**
* Play the game
*/
play(): void;
/**
* Reset the Game
*/
resetGame(): void;
/**
* New Level Set-up
*/
private newLevelSetup;
/**
* next level
*/
private nextLevel;
/**
* Pause the game
*
* @param isNextLevel If you should display the next level dialog
*/
private pauseGame;
/**
* Pause the game
*/
pause(): void;
/**
* Abstract event handlers
* @param type The input type
* @param code The key code
*/
private handleEventListeners;
/**
* The keyEvent down listener
* @param event the Keyboard event
*/
keyDownEvent(event: KeyboardEvent): void;
/**
* The keyEvent uplistener
*
* @param event the Keyboard event
*/
keyUpEvent(event: KeyboardEvent): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GameboardComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GameboardComponent, "bp-prism-gameboard", never, {}, {}, never, never>;
}