feat(themes): 骚猪主题
|
@ -27,7 +27,7 @@
|
|||
- 撤销:撤销上一次操作,无限次数
|
||||
- 洗牌:哗啦哗啦,无限次数
|
||||
- 关卡:50 关玩到爽,可直接跳
|
||||
- 主题:金轮<img style="width:36px" src="src/themes/jinlun/images/肌肉金轮1.png" />、ikun<img style="width:36px" src="src/themes/ikun/images/kun.png" /> 主题等(露出黑脚)
|
||||
- 主题:金轮<img style="width:36px" src="src/themes/jinlun/images/肌肉金轮1.png" />、骚猪<img style="width:36px" src="src/themes/pdd/images/1.png" />、ikun<img style="width:36px" src="src/themes/ikun/images/kun.png" /> 主题等(露出黑脚)
|
||||
|
||||
开心就好 😄
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
// 如果您基于此项目二创,可以删除以下代码
|
||||
// 否则请标明原仓库地址
|
||||
setTimeout(()=>{
|
||||
const {host} = location
|
||||
if(host!=='localhost'&&!host.endsWith('streakingman.com')){
|
||||
const {hostname} = location
|
||||
if(hostname!=='localhost'&&!hostname.endsWith('streakingman.com')){
|
||||
const a = document.createElement('a')
|
||||
a.setAttribute('href','https://github.com/StreakingMan/solvable-sheep-game')
|
||||
a.setAttribute('target','_blank')
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -29,6 +29,7 @@ export const defaultSounds: Theme<DefaultSoundNames>['sounds'] = [
|
|||
];
|
||||
|
||||
export const defaultTheme: Theme<DefaultSoundNames> = {
|
||||
title: '有解的羊了个羊(DEMO)',
|
||||
name: '默认',
|
||||
icons: icons.map((icon) => ({
|
||||
name: icon,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 }) => ({
|
||||
|
|
|
@ -13,6 +13,7 @@ interface Sound<T = string> {
|
|||
}
|
||||
|
||||
export interface Theme<SoundNames> {
|
||||
title: string;
|
||||
name: string;
|
||||
bgm?: string;
|
||||
icons: Icon<SoundNames>[];
|
||||
|
|
|
@ -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,
|
||||
|
|
BIN
src/themes/pdd/images/10.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
src/themes/pdd/images/2.png
Normal file
After Width: | Height: | Size: 236 KiB |
BIN
src/themes/pdd/images/3.png
Normal file
After Width: | Height: | Size: 134 KiB |
BIN
src/themes/pdd/images/6.png
Normal file
After Width: | Height: | Size: 195 KiB |
BIN
src/themes/pdd/images/7.png
Normal file
After Width: | Height: | Size: 204 KiB |
BIN
src/themes/pdd/images/8.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
src/themes/pdd/images/9.png
Normal file
After Width: | Height: | Size: 181 KiB |
30
src/themes/pdd/index.tsx
Normal 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,
|
||||
};
|