입양 모달·고양이 카드에 실제 스프라이트 사용
- catSprite(breed, frame) 헬퍼 + CAT_SPRITE_DIR 품종별 폴더 매핑 준비 - 모달 후보는 idle 스프라이트(h-20), 카드 헤더는 미니 아바타(h-7) - 품종 시트가 들어오면 CAT_SPRITE_DIR 등록만으로 확장 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
이 커밋은 다음에 포함됨:
@@ -4,6 +4,18 @@ import type { AptitudeKey } from "./types";
|
||||
export const APTITUDE_RATE = [0, 1.0, 2.2, 4.8, 10.0, 21.0, 45.0];
|
||||
export const BASE_RATE = 0.2;
|
||||
|
||||
// 품종별 스프라이트 폴더 (public/assets/cats/{폴더}/). 미등록 품종은 기본(오렌지 태비) 사용
|
||||
export const CAT_SPRITE_DIR: Record<string, string> = {
|
||||
// 예: korean_shorthair: "korean_shorthair", ← 품종 시트가 준비되면 등록
|
||||
};
|
||||
|
||||
export type CatFrame = "idle" | "walk1" | "walk2" | "work";
|
||||
|
||||
export function catSprite(breed: string, frame: CatFrame): string {
|
||||
const dir = CAT_SPRITE_DIR[breed];
|
||||
return dir ? `/assets/cats/${dir}/${frame}.png` : `/assets/cats/${frame}.png`;
|
||||
}
|
||||
|
||||
// 적성별 도구 일러스트 (public/assets/tools/)
|
||||
export const TOOL_IMG: Record<AptitudeKey, string> = {
|
||||
fishing: "/assets/tools/fishing.png",
|
||||
|
||||
새 이슈에서 참조
사용자 차단