Files
youle_cocos/cocoscreator_projects/framework-tests/fixtures/game-definitions.ts
T
joywayer 35216f75e7 feat: integrate room framework and isolated subgame bundles
Complete room UI and protocol integration, move game definitions and resources behind bundle entries, publish authoritative version XML, and document single-game builds. Include all current resource changes and experiment artifacts.
2026-09-09 03:13:18 +08:00

10 lines
653 B
TypeScript

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];
}