feat(themes): 骚猪主题

This commit is contained in:
streakingman
2022-09-21 19:27:29 +08:00
parent b3b5737e5c
commit 30bb7a0277
17 changed files with 41 additions and 5 deletions
+3 -2
View File
@@ -14,9 +14,10 @@ import { Icon, Theme } from './themes/interface';
import { fishermanTheme } from './themes/fisherman';
import { jinlunTheme } from './themes/jinlun';
import { ikunTheme } from './themes/ikun';
import { pddTheme } from './themes/pdd';
// 主题
const themes = [defaultTheme, fishermanTheme, jinlunTheme, ikunTheme];
const themes = [defaultTheme, fishermanTheme, jinlunTheme, ikunTheme, pddTheme];
// 最大关卡
const maxLevel = 50;
@@ -370,7 +371,7 @@ const App: FC = () => {
return (
<>
<h2>(DEMO)</h2>
<h2>{curTheme.title}</h2>
<h6>
<GithubIcon />
</h6>
+1
View File
@@ -29,6 +29,7 @@ export const defaultSounds: Theme<DefaultSoundNames>['sounds'] = [
];
export const defaultTheme: Theme<DefaultSoundNames> = {
title: '有解的羊了个羊(DEMO)',
name: '默认',
icons: icons.map((icon) => ({
name: icon,
+1
View File
@@ -16,6 +16,7 @@ const fishes = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const fishermanTheme: Theme<DefaultSoundNames> = {
title: '🐟鱼了个鱼🐟',
name: '钓鱼佬',
icons: fishes.map(({ name, content }) => ({
name,
+1
View File
@@ -52,6 +52,7 @@ const icons = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const ikunTheme: Theme<SoundNames> = {
title: '🐔鸡了个鸡🐔',
name: 'iKun',
bgm,
icons: icons.map(({ name, content }) => ({
+1
View File
@@ -13,6 +13,7 @@ interface Sound<T = string> {
}
export interface Theme<SoundNames> {
title: string;
name: string;
bgm?: string;
icons: Icon<SoundNames>[];
+1
View File
@@ -24,6 +24,7 @@ const icons = Object.entries(imagesUrls).map(([key, value]) => ({
}));
export const jinlunTheme: Theme<string> = {
title: '🐎马了个马🐎',
name: '金轮',
icons: icons.map(({ name, content }) => ({
name,
Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

+30
View File
@@ -0,0 +1,30 @@
// 骚猪主题
import React from 'react';
import { Theme } from '../interface';
import { DefaultSoundNames, defaultSounds } from '../default';
import bgm from './sounds/bgm.mp3';
const imagesUrls = import.meta.glob('./images/*.png', {
import: 'default',
eager: true,
});
const images = Object.entries(imagesUrls).map(([key, value]) => ({
name: key.slice(9, -4),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
content: <img src={value} alt="" />,
}));
export const pddTheme: Theme<DefaultSoundNames> = {
title: '🐷猪了个猪🐷',
name: '骚猪',
bgm,
icons: images.map(({ name, content }) => ({
name,
content,
clickSound: 'button-click',
tripleSound: 'triple',
})),
sounds: defaultSounds,
};
Binary file not shown.