Initial flame_lua_runtime package

This commit is contained in:
gem
2026-06-07 22:53:58 +08:00
commit 733b2fb798
262 changed files with 28439 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
part of 'runtime_audio_manager.dart';
extension _RuntimeAudioManagerDebug on RuntimeAudioManager {
Map<String, Object?> _audioRecordDebugJson({
required String? key,
required String path,
required String? preload,
required bool declared,
}) {
final record = _audios[path];
return {
if (key != null) 'key': key,
'path': path,
'type': GameResourceType.audio,
'declared': declared,
if (preload != null) 'preload': preload,
if (key != null && _package?.manifest.resources[key]?.group != null)
'group': _package?.manifest.resources[key]?.group,
'state': (record?.state ?? GameResourceState.idle).name,
if (record != null) 'generation': record.generation,
'loading': record?.inflight != null,
'ready': record?.bytes != null,
if (record?.bytes != null) 'bytes': record!.bytes!.length,
if (record?.lastError != null) 'error': record!.lastError.toString(),
};
}
}