Skip to content

Commit

Permalink
feat: add battle action
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivomo committed Oct 21, 2023
1 parent d4215cb commit f69bed4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/client/src/components/MapCell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const MapCell = (props: IProps) => {
const [menuVisible, setMenuVisible] = useState(false);
const [activePlayerId, setActivePlayerId] = useState(-1);

const { mapData, openTreasureChest } = useContext(GameContext);
const { mapData, openTreasureChest, setStartBattleData } = useContext(GameContext);

const isDelivery = DELIVERY.x === x && DELIVERY.y === y;

Expand Down Expand Up @@ -85,6 +85,7 @@ const MapCell = (props: IProps) => {
case 'info':
break;
case 'attack':
setStartBattleData(true);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/components/MapCell/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

.mi-btn {
font-size: 24px;
font-size: 16px;
width: 136px;
height: 46px;
}
Expand Down

0 comments on commit f69bed4

Please sign in to comment.