From 88f024dfbce799254b3a40a696addcc8506a6af1 Mon Sep 17 00:00:00 2001 From: cyber-dream Date: Tue, 18 Oct 2022 03:23:46 +0300 Subject: [PATCH] create working game lists in go --- src/app/app.component.ts | 4 ---- src/app/interfaces/game.interface.ts | 3 ++- src/app/services/go.ts | 2 +- src/app/services/launcher.service.ts | 5 ++++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4d63a84..033e9ac 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -18,8 +18,4 @@ export class AppComponent { }); //GetVersion(); } - - RunGame() { - //RunGame(); - } } diff --git a/src/app/interfaces/game.interface.ts b/src/app/interfaces/game.interface.ts index 37f5170..be50df2 100644 --- a/src/app/interfaces/game.interface.ts +++ b/src/app/interfaces/game.interface.ts @@ -1,5 +1,6 @@ export interface Game { - id: number; + id: number; //TODO: Заменить на строку + gameId: string title: string; image: string; description: string; diff --git a/src/app/services/go.ts b/src/app/services/go.ts index acc0fd5..ece084a 100644 --- a/src/app/services/go.ts +++ b/src/app/services/go.ts @@ -2,7 +2,7 @@ import { Game } from '../interfaces/game.interface'; export interface Go extends Window { GetGames: () => Promise; - GoRunGame: (gameId: number) => void; + GoRunGame: (gameId: string) => void; } export interface GoCallback extends Window { diff --git a/src/app/services/launcher.service.ts b/src/app/services/launcher.service.ts index a8ce8ae..9a09752 100644 --- a/src/app/services/launcher.service.ts +++ b/src/app/services/launcher.service.ts @@ -15,6 +15,9 @@ export class LauncherService { public RunGame(game: Game){ //console.log(game) - GoRunGame(game.id) + GoRunGame(game.gameId) + // console.log(game) + // console.log(game.title) + // console.log(game.gameId) } }