Complete Cocos Creator port with level bundles, themes, and tooling.

Adds level prefabs, theme assets, audio, extensions, and deployment scripts for the Unity WebGL migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-16 15:30:58 +08:00
parent cba5105908
commit d393302388
6248 changed files with 17322729 additions and 11036 deletions

View File

@@ -0,0 +1,25 @@
import { SpawnKind } from './LevelTypes';
import { CELL_PIXEL } from '../core/GridConstants';
import { getEntityCellBox } from '../visual/EntityDisplayRefs';
/** spawns[].scale 为相对默认值的比例1 = 默认大小 */
export function resolveEntityScaleMul(kind: SpawnKind, spawnScale?: number): number {
const mul = spawnScale !== undefined && spawnScale !== null && !Number.isNaN(spawnScale)
? spawnScale
: 1;
return Math.max(0.1, Math.min(4, mul));
}
export function resolveEntityHeight(kind: 'player' | 'vehicle', spawnScale?: number, theme?: string): number {
const box = getEntityCellBox(theme)[kind];
return CELL_PIXEL * box.h * resolveEntityScaleMul(kind, spawnScale);
}
/** 可拾取物等基准缩放spawn scale 倍率用,显示尺寸见 themes-database entityDisplay */
export const ENTITY_BASE_SCALE: Record<SpawnKind, number> = {
player: 1,
vehicle: 1,
prop: 1,
prop_decor: 0.87,
enemy: 1,
};