mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
implemented game state in front end
This commit is contained in:
@@ -7,12 +7,12 @@ import { useTeamContext } from "@/context/teamContext";
|
||||
export default function useGame() {
|
||||
const {teamSocket} = useSocket();
|
||||
const {teamId} = useTeamConnexion();
|
||||
const {currentPosition, enemyPosition} = useTeamContext();
|
||||
const {currentPosition, enemyPosition, gameState} = useTeamContext();
|
||||
|
||||
function sendCurrentPosition() {
|
||||
teamSocket.emit("send_position");
|
||||
}
|
||||
|
||||
|
||||
return { sendCurrentPosition, enemyPosition, currentPosition, teamId };
|
||||
return { sendCurrentPosition, enemyPosition, currentPosition, teamId, gameState};
|
||||
}
|
||||
Reference in New Issue
Block a user