solvable-sheep-game/src/themes/interface.ts
2022-09-26 21:40:15 +08:00

28 lines
550 B
TypeScript

import { ReactNode } from 'react';
export interface Icon<T = string> {
name: string;
content: ReactNode;
clickSound: T;
tripleSound: T;
}
export interface Sound<T = string> {
name: T;
src: string;
}
type Operation = 'shift' | 'undo' | 'wash';
// TODO title name 冗余
export interface Theme<SoundNames> {
title: string;
desc?: ReactNode;
name: string;
bgm?: string;
pure?: boolean;
icons: Icon<SoundNames>[];
sounds: Sound<SoundNames>[];
operateSoundMap?: Record<Operation, SoundNames>;
}