RaptusBackend / sockets /RoundStartEnd.js
GitHub Actions
Initial commit
df72131
raw
history blame contribute delete
724 Bytes
const { teamNotification, userNotification } = require("./Notification");
let io;
module.exports.initialize = function initialize(ioInstance) {
io = ioInstance;
}
module.exports.teamRoundOver = function teamRoundOver(user, round) {
const teamID = user.TeamID.toString();
io.to(teamID).emit('round', "Round is over!");
teamNotification(user, "You have completed Round " + round + " !");
}
module.exports.roundEnd = function roundEnd(round) {
io.sockets.emit('round', "Time is up!");
userNotification("Round " + round + " is over!");
}
module.exports.round4End = function round4End() {
io.sockets.emit('round', "hunt completed!");
userNotification("Some Team completed the hunt!");
}