mirror of
https://github.com/exane/not-gwent-online
synced 2024-11-23 19:36:53 +00:00
nothing
This commit is contained in:
parent
d469585b89
commit
215b30ee42
@ -126,7 +126,7 @@ $game-height: 800px;
|
|||||||
|
|
||||||
i {
|
i {
|
||||||
display: block;
|
display: block;
|
||||||
transform: scale(1);
|
//transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.card-attr-power {
|
/*.card-attr-power {
|
||||||
|
@ -33,14 +33,6 @@ var User = (function(){
|
|||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*r.joinRoom = function(roomid){
|
|
||||||
var self = this;
|
|
||||||
*//*this.socket.on(roomid, function(d) {
|
|
||||||
var event = d.event, data = d.data;
|
|
||||||
self.socket.on(event, data);
|
|
||||||
});*//*
|
|
||||||
}*/
|
|
||||||
|
|
||||||
r.send = function(event, data, room){
|
r.send = function(event, data, room){
|
||||||
room = room || null;
|
room = room || null;
|
||||||
data = data || null;
|
data = data || null;
|
||||||
@ -49,10 +41,6 @@ var User = (function(){
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.socket.to(room).emit(event, data);
|
this.socket.to(room).emit(event, data);
|
||||||
/*this.socket.global.publish(room, {
|
|
||||||
event: event,
|
|
||||||
data: data
|
|
||||||
})*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,28 +116,6 @@ var User = (function(){
|
|||||||
socket.emit("response:name", {name: self.getName()});
|
socket.emit("response:name", {name: self.getName()});
|
||||||
})
|
})
|
||||||
|
|
||||||
/*socket.on("request:createRoom", function(){
|
|
||||||
var room = Room();
|
|
||||||
connections.roomCollection[room.getID()] = room;
|
|
||||||
room.join(self);
|
|
||||||
console.log("room %s created by %s", room.getID(), self.getName());
|
|
||||||
self.send("response:createRoom", room.getID());
|
|
||||||
})
|
|
||||||
|
|
||||||
socket.on("request:joinRoom", function(){
|
|
||||||
console.log("joinroom");
|
|
||||||
var interval = setInterval(function(){
|
|
||||||
for(var key in connections.roomCollection) {
|
|
||||||
var room = connections.roomCollection[key];
|
|
||||||
if(!room.isOpen()) continue;
|
|
||||||
room.join(self);
|
|
||||||
clearInterval(interval);
|
|
||||||
console.log("user %s joined room %s", self.getName(), room.getID());
|
|
||||||
self.send("response:joinRoom", room.getID());
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
})*/
|
|
||||||
|
|
||||||
socket.on("request:matchmaking", function() {
|
socket.on("request:matchmaking", function() {
|
||||||
if(self._inQueue) return;
|
if(self._inQueue) return;
|
||||||
matchmaking.findOpponent(self);
|
matchmaking.findOpponent(self);
|
||||||
|
@ -29,7 +29,7 @@ global.io = require("socket.io")(app);
|
|||||||
|
|
||||||
app.listen(16918);
|
app.listen(16918);
|
||||||
|
|
||||||
io.on("connection", function(socket) {
|
io.on("connection", function(socket) { //global connection
|
||||||
var user;
|
var user;
|
||||||
connections.add(user = User(socket));
|
connections.add(user = User(socket));
|
||||||
console.log("new user ", user.getName());
|
console.log("new user ", user.getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user