Win event

This commit is contained in:
thepaperpilot 2023-02-28 20:57:00 -06:00
parent 7367d34d0d
commit d1bcbf5178
2 changed files with 4 additions and 0 deletions

View file

@ -280,6 +280,9 @@ function setupSocket(socket: Socket<ServerToClientEvents, ClientToServerEvents>)
main.gold.value -= 3; main.gold.value -= 3;
} }
}); });
socket.on("win", () => {
main.wins.value++;
});
} }
function startStream( function startStream(

1
src/data/types.d.ts vendored
View file

@ -57,6 +57,7 @@ interface ServerToClientEvents {
room: (room: string, streamType: StreamTypes) => void; room: (room: string, streamType: StreamTypes) => void;
"room failed": (err: string) => void; "room failed": (err: string) => void;
"stream type": (type: StreamTypes, charge: boolean) => void; "stream type": (type: StreamTypes, charge: boolean) => void;
win: () => void;
} }
interface ClientToServerEvents { interface ClientToServerEvents {