import {GAME_DEFINITIONS as template} from '../../YouleNexus/assets/games/template/game-definition.ts'; import {GAME_DEFINITIONS as erqiwang} from '../../YouleNexus/assets/games/erqiwang/game-definition.ts'; import type {GameDefinition} from '../../YouleNexus/assets/framework/sdk/contracts/game-definition.ts'; /** Test-only inventory, excluded from Cocos assets. */ export const GAME_DEFINITIONS={...template,...erqiwang}; export function getGameDefinition(key:string):GameDefinition { if(!Object.prototype.hasOwnProperty.call(GAME_DEFINITIONS,key))throw Error('Unknown game: '+key); return GAME_DEFINITIONS[key as keyof typeof GAME_DEFINITIONS]; }