Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deploy] version 0.0.6 #57

Merged
merged 46 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6b8f2b3
feat: 레이싱 게임 오디오 추가 (CC-162)
minani-0621 Aug 16, 2024
41efc76
feat: 레이싱 게임 점수 백분위 확인 fetch DTO 구현 (CC-163)
minani-0621 Aug 16, 2024
f8ea748
feat: 레이싱 게임에 상위 백분위 구현 (CC-163)
minani-0621 Aug 16, 2024
229f918
design: 레이싱 게임 CSS 수정 (CC-163)
minani-0621 Aug 16, 2024
48500ae
Merge pull request #48 from softeerbootcamp4th/CC-163
Dunkkkk Aug 16, 2024
a200f54
Merge branch 'develop' into CC-162
minani-0621 Aug 17, 2024
dbb2a8d
rename: 레이싱 게임에 필요한 오디오 파일 교체 (CC-162)
minani-0621 Aug 18, 2024
8cab0e9
feat: 레이싱 게임에 플레이 사운드와 게임 종료 사운드 구현 (CC-162)
minani-0621 Aug 18, 2024
7c863e4
comment: 주석 삭제 (CC-162)
minani-0621 Aug 18, 2024
dbde16b
fix: 레이싱 게임 도중 게임을 빠르게 다시시작 할 때 2개의 오디오가 충돌하는 버그 수정 (CC-162)
minani-0621 Aug 18, 2024
73e1266
style: 중복되는 불필요한 코드 삭제 (CC-162)
minani-0621 Aug 18, 2024
738cbe3
hotfix: demo day에 생겼던 에러 수정
Dunkkkk Aug 19, 2024
7b2a28a
hotfix: 숨은그림찾기 날짜판별 로직 변경
Dunkkkk Aug 19, 2024
b0c8efd
style: 레이싱 게임 내부의 handleSmoothlyStop()에서 더 이동해야 하는 거리에 매직넘버 적용 (CC-162)
minani-0621 Aug 19, 2024
481ac02
fix: api 호출 경로 포트번호 8080에서 80으로 수정 (CC-162)
minani-0621 Aug 19, 2024
cf9d83a
refactor: 레이싱 게임의 오디오 제어 함수들을 utils로 빼서 모듈화 (CC-162)
minani-0621 Aug 19, 2024
9fd87d8
Merge pull request #49 from softeerbootcamp4th/CC-162
minani-0621 Aug 19, 2024
f891849
Merge pull request #50 from softeerbootcamp4th/hotfix/demoError
minani-0621 Aug 19, 2024
7fbe107
hotfix: useDebounce 훅 구현
minani-0621 Aug 19, 2024
a4f7496
hotfix: 레이싱 게임에서 게임 종료 시에만 점수 백분위 api를 한 번만 호출하도록 구현
minani-0621 Aug 19, 2024
5462746
Merge pull request #51 from softeerbootcamp4th/hotfix/refactorTopRateApi
Dunkkkk Aug 19, 2024
48035f4
fix: 숨은 캐스퍼 찾기 랜딩페이지 화면 대응 (CC-170)
Dunkkkk Aug 20, 2024
bfafb7a
Merge pull request #53 from softeerbootcamp4th/CC-170
minani-0621 Aug 20, 2024
a02656a
fix: aciton당 하나의 story를 실행하도록 변경 (CC-171)
Dunkkkk Aug 20, 2024
6ca0e22
fix: action의 리턴값을 request, response를 2개를 받는 형태로 변경 (CC-171)
Dunkkkk Aug 20, 2024
417e9da
style: 변수면 철자 변경 (CC-171)
Dunkkkk Aug 20, 2024
e0c391f
fix: 기존 click action에서 SagaActionPayLoad의 파라미터를 가지는 action으로 변경 (CC-171)
Dunkkkk Aug 20, 2024
a2f04aa
feat: 게임 정답을 찾는 API parameter를 만드는 genrateFindGameAnswerCheckBodyPara…
Dunkkkk Aug 20, 2024
1a4ceed
fix: 기존 saga의 변경에 따른 reducer 수정 (CC-171)
Dunkkkk Aug 20, 2024
1df4c98
style: story interface 파라미터 이름 변경 (CC-171)
Dunkkkk Aug 20, 2024
2c125d3
fix: 변경된 saga 방식 적용 (CC-171)
Dunkkkk Aug 20, 2024
29a27f0
fix: 변경된 saga에 맞는 getFindGameAnswerStory 변경 (CC-171)
Dunkkkk Aug 20, 2024
d41aa31
fix: 변경된 saga에 맞춰 UI적용방식 변경 (CC-171)
Dunkkkk Aug 20, 2024
b37a80f
fix: hyundux-saga Example 수정 (CC-171)
Dunkkkk Aug 20, 2024
6ebc863
fix: vite build시 발생하는 에러 제거 (CC-171)
Dunkkkk Aug 20, 2024
08d0dbd
Merge pull request #54 from softeerbootcamp4th/CC-171
minani-0621 Aug 20, 2024
d21cf53
feat: hint ui 구성 및 연결 (CC-172)
Dunkkkk Aug 21, 2024
141ebe9
feat: PictureBoard의 넓이가 변할떄마다 새로운 넓이를 반환하는 기능 추가 (CC-172)
Dunkkkk Aug 21, 2024
d20a00a
fix: 파일구조변경에 따른 import문 수정 (CC-172)
Dunkkkk Aug 21, 2024
b55f263
feat: hint를 받고 업데이트해주는 로직 추가 (CC-172)
Dunkkkk Aug 21, 2024
e57a343
rename: 파일 구조 변경 (CC-172)
Dunkkkk Aug 21, 2024
4ec6511
feat: hint를 위한 story 구현 (CC-172)
Dunkkkk Aug 21, 2024
2533e42
refactor: 기존 RacingGame 리팩토링 (CC-172)
Dunkkkk Aug 21, 2024
619c6fb
fix: build error 수정 (CC-172)
Dunkkkk Aug 21, 2024
ce0c76d
Merge pull request #56 from softeerbootcamp4th/CC-172
minani-0621 Aug 21, 2024
07caf39
chore: gzip을 지원하는 의존성 추가
Dunkkkk Aug 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Caecae/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
"jest": "^29.7.0",
"terser-brunch": "^4.1.0",
"ts-jest": "^29.2.3",
"typescript": "^5.5.4",
"vite": "^5.4.0"
"vite": "^5.4.0",
"vite-plugin-compression": "^0.5.1"
}
}
Binary file not shown.
Binary file not shown.
87 changes: 62 additions & 25 deletions Caecae/src/components/FindingGame/FindingGame.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,84 @@
import PictureGameBoard from "../common/PictureGameBoard/index.tsx";
import {
action,
genrateFindGameAnswerCheckBodyParameter,
initFindingGameState,
} from "../../jobs/FindingGame/FindingGameWork.tsx";
import { useEffect, useRef } from "react";
import LottieContainer from "../common/LottieContainer/index.tsx";
import correctLottie from "@assets/animationCorrect.json";
import wrongLottie from "@assets/animationIncorrect.json";
import { store, useExistState } from "../../shared/Hyundux";
//import HintSpot from "./Hint/HintSpot.tsx";
import HintSpot from "./Hint/HintSpot.tsx";
import SmileBadge from "../common/SmileBadge/index.tsx";
import { createStory } from "../../shared/Hyundux-saga/Story.tsx";
import useSaga from "../../shared/Hyundux-saga/useSaga.tsx";
import { getFindGameStory } from "../../stories/getFindingGame.tsx";
import { getFindGameStory } from "../../stories/FindGame/getFindingGame.tsx";
import { getFindGameAnswerStory } from "../../stories/FindGame/getFindGameIsAnswer.tsx";
import { getFindGameHintStory } from "../../stories/FindGame/getFindGameHint.tsx";

const FindingGame = () => {
const state = useExistState(initFindingGameState);
// const timerId = useRef<NodeJS.Timeout | null>(null);
const timerId = useRef<NodeJS.Timeout | null>(null);
const [status, teller] = useSaga();
const pictureWidth = useRef(0);
const pictureHeight = useRef(0);
const hintTime = 40 * 1000; // 1000ms는 1초
status;
useEffect(() => {
const getFindGameRunStory = createStory(getFindGameStory, {});
teller(action.init, [getFindGameRunStory]);
// timerId.current = setTimeout(() => {
// store.dispatch(action.showHint());
// }, 40000);
teller(action.init, getFindGameRunStory);
timerId.current = setTimeout(() => {
teller(action.showHint, getFindGameHintStory, {
answerList: state.showingAnswers.map((answer) => {
return { positionX: answer.positionX, positionY: answer.positionY };
}),
});
}, hintTime);
}, []);

// useEffect(() => {
// if (state.showingHint.length == 0) {
// if (timerId.current != null) {
// clearInterval(timerId.current);
// }
// timerId.current = setTimeout(() => {
// store.dispatch(action.showHint());
// }, 40000);
// }
// }, [state.showingHint]);
useEffect(() => {
if (timerId.current != null) {
clearInterval(timerId.current);
}
timerId.current = setTimeout(() => {
teller(action.showHint, getFindGameHintStory, {
answerList: state.showingAnswers.map((answer) => {
return { positionX: answer.positionX, positionY: answer.positionY };
}),
});
}, hintTime);
}, [state.showingAnswers]);

useEffect(() => {
if (state.showingHint.length == 0) {
if (timerId.current != null) {
clearInterval(timerId.current);
}
timerId.current = setTimeout(() => {
teller(action.showHint, getFindGameHintStory, {
answerList: state.showingAnswers.map((answer) => {
return { positionX: answer.positionX, positionY: answer.positionY };
}),
});
}, hintTime);
}
}, [state.showingHint]);

const onClickAction = (
width: number,
heigjht: number,
height: number,
y: number,
x: number
) => {
pictureWidth.current = width;
pictureHeight.current = heigjht;
pictureHeight.current = height;
if (state.gameStatus == "Gaming") {
store.dispatch(action.click(y, x, width, heigjht));
teller(
action.click,
getFindGameAnswerStory,
genrateFindGameAnswerCheckBodyParameter(state, y, x, width, height)
);
}
};

Expand Down Expand Up @@ -114,18 +143,26 @@ const FindingGame = () => {
);
});

// const showingHintElement = state.showingHint.map((hintAnswer) => {
// return <HintSpot y={hintAnswer.y} x={hintAnswer.x} />;
// });

const showingHintElement = state.showingHint.map((hintAnswer) => {
return (
<HintSpot
y={hintAnswer.positionY * pictureHeight.current}
x={hintAnswer.positionX * pictureWidth.current}
/>
);
});
return (
<div>
<PictureGameBoard
imageURL={state.imageURL}
setRect={(width, height) => {
pictureWidth.current = width;
pictureHeight.current = height;
}}
showingElements={[
...showingCorrectElements,
...showingWrongElement,
//...showingHintElement,
...showingHintElement,
...answerElement,
]}
onClickAction={onClickAction}
Expand Down
Loading
Loading