Skip to content

Commit

Permalink
Merge pull request #59 from nkc-ug/feature/emotionName
Browse files Browse the repository at this point in the history
fix/moveGoat
  • Loading branch information
MinamizonoEno authored Jul 21, 2023
2 parents 0fadbba + be4a6b0 commit 9c6bab4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const App: React.FC = () => {
position: 'absolute',
left: 0,
right: 0,
bottom: 30,
bottom: 10,
zIndex: 3,
}}
>
Expand Down
10 changes: 5 additions & 5 deletions src/NormalWalk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import yagi_right from './assets/yagi_right.png';

const NormalWalk: React.FC = () => {
const walkerRef = useRef<HTMLDivElement>(null);
const [position, setPosition] = useState({ x: 65, y: 0 });
const [position, setPosition] = useState({ x: 120, y: -50 });
const [containerSize, setContainerSize] = useState({ width: 0, height: 0 });
useEffect(() => {
const walkerElement = walkerRef.current;
Expand Down Expand Up @@ -32,10 +32,10 @@ const NormalWalk: React.FC = () => {
useEffect(() => {
if (!walkerRef.current) return; // walkerRef.currentがnullの場合、処理を終了

const startX = containerSize.width / 2 - 130; // 開始位置のx座標
const startY = containerSize.height / 2 - 130; // 開始位置のy座標
const endX = containerSize.width / 2 + 130; // 終了位置のx座標
const endY = containerSize.height / 2 + 130; // 終了位置のy座標
const startX = containerSize.width / 2 - 150; // 開始位置のx座標
const startY = containerSize.height / 2 - 150; // 開始位置のy座標
const endX = containerSize.width / 2 + 100; // 終了位置のx座標
const endY = containerSize.height / 2 + 30; // 終了位置のy座標

const updatePosition = () => {
const newX = startX + Math.random() * (endX - startX);
Expand Down

0 comments on commit 9c6bab4

Please sign in to comment.