feat: 날씨게임 구름 합치기 (/game) — 같은 날씨끼리 합쳐 해까지, 오늘 우리 구 풍속만큼 옆으로 밀림, 60초 라운드·목표 점수, 게임 방법 창
This commit is contained in:
1 parent
92206d82f0
commit
b2c46086a3
8 files changed
+444
-1
No files matched your search
@@ -39,6 +39,7 @@ import { MixSheet, MyGakSheet } from './myGak'
|
||||
import { ownPage, useRegion } from './regionContext'
|
||||
import { WeatherWhySheet } from './weatherWhy'
|
||||
import { useSky } from './skyContext'
|
||||
import { LEVELS } from './cloudMerge'
|
||||
import { SHARE_SIZES, shareImage, type ShareSize } from './storyImage'
|
||||
import { SheetContext, useSheet, type SharePayload, type SheetState } from './sheetContext'
|
||||
import { HeartIcon } from './svg'
|
||||
@@ -85,7 +86,7 @@ export function SheetProvider({ children }: { children: ReactNode }) {
|
||||
)
|
||||
}
|
||||
|
||||
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기' } as const
|
||||
const TITLES = { article: '읽을거리', seasonWeek: '이번 주 특집', share: '보내기', comments: '댓글', login: '로그인', me: '내 정보', region: '지역 바꾸기', install: '홈 화면에 추가', weatherWhy: '날씨 점수는 이렇게 나와요', talk: '이야기', gameHelp: '구름 합치기 하는 법' } as const
|
||||
|
||||
/** 아래에서 올라오는 창: 네이티브 <dialog>라 ESC·포커스 가두기·포커스 되돌리기가 기본으로 된다 */
|
||||
function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void }) {
|
||||
@@ -173,6 +174,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void
|
||||
{shown.type === 'install' && <InstallSheet />}
|
||||
{shown.type === 'weatherWhy' && <WeatherWhySheet d={shown.why} />}
|
||||
{shown.type === 'talk' && <TalkSheet talk={shown.talk} />}
|
||||
{shown.type === 'gameHelp' && <GameHelpSheet />}
|
||||
</div>
|
||||
)}
|
||||
{!shown && <RegionLinks />}
|
||||
@@ -514,6 +516,36 @@ function ArticleSheet({ articleId, onTitle }: { articleId: number; onTitle: (t:
|
||||
}
|
||||
|
||||
/* ---------- 이번 주 특집 ---------- */
|
||||
const GAME_STEPS = [
|
||||
'라운드마다 60초 안에 목표 점수를 채우면 다음 라운드로 넘어가요. 라운드가 오를수록 목표가 높아져요.',
|
||||
'손가락을 좌우로 움직여 떨어뜨릴 자리를 고르고, 손을 떼면 떨어져요.',
|
||||
'떨어지는 동안 오늘 우리 동네 바람만큼 옆으로 밀려요. 바람 방향을 보고 조금 비켜 떨어뜨리세요.',
|
||||
'같은 그림끼리 닿으면 한 단계 큰 그림으로 합쳐지고 점수가 올라요.',
|
||||
'해 둘이 만나면 사라지면서 보너스 점수!',
|
||||
'시간 안에 목표를 못 채우거나, 쌓인 그림이 위쪽 점선을 넘은 채로 잠깐 있으면 끝나요. 판은 다음 라운드로 그대로 이어져요.',
|
||||
]
|
||||
|
||||
function GameHelpSheet() {
|
||||
return (
|
||||
<Body>
|
||||
<ol className="m-0 flex list-decimal flex-col gap-2 pl-5 text-[15px] leading-[1.6]">
|
||||
{GAME_STEPS.map((t) => (
|
||||
<li key={t}>{t}</li>
|
||||
))}
|
||||
</ol>
|
||||
<p className="mt-4 mb-2 text-[13px] font-extrabold text-(--ink2)">합쳐지는 순서</p>
|
||||
<div className="grid grid-cols-4 gap-2 rounded-[16px] bg-[#f3f6fb] p-3">
|
||||
{LEVELS.map((l, i) => (
|
||||
<span key={l.icon} className="flex flex-col items-center gap-0.5 text-[12px] font-bold">
|
||||
<Ic name={l.icon} className="size-8" />
|
||||
{i + 1}. {l.name}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</Body>
|
||||
)
|
||||
}
|
||||
|
||||
function SeasonWeekSheet() {
|
||||
const { open } = useSheet()
|
||||
const q = useQuery(getSeasonWeekOptions())
|
||||
|
||||
Reference in new issue
Block a user