From f69bed4393e40d8f3f64131581eb29401e51e90f Mon Sep 17 00:00:00 2001 From: vivomo <929992114@qq.com> Date: Sun, 22 Oct 2023 00:26:44 +0800 Subject: [PATCH] feat: add battle action --- packages/client/src/components/MapCell/index.tsx | 3 ++- packages/client/src/components/MapCell/styles.scss | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/MapCell/index.tsx b/packages/client/src/components/MapCell/index.tsx index 6ad81157..54d69844 100644 --- a/packages/client/src/components/MapCell/index.tsx +++ b/packages/client/src/components/MapCell/index.tsx @@ -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; @@ -85,6 +85,7 @@ const MapCell = (props: IProps) => { case 'info': break; case 'attack': + setStartBattleData(true); break; } } diff --git a/packages/client/src/components/MapCell/styles.scss b/packages/client/src/components/MapCell/styles.scss index 527d6d62..627c95e6 100644 --- a/packages/client/src/components/MapCell/styles.scss +++ b/packages/client/src/components/MapCell/styles.scss @@ -57,7 +57,7 @@ } .mi-btn { - font-size: 24px; + font-size: 16px; width: 136px; height: 46px; }