more improvements
This commit is contained in:
parent
05e5456c4b
commit
7b4789dd2a
1
main.js
1
main.js
@ -117,6 +117,7 @@ on_close_click = function() {
|
|||||||
else if (connection != null)
|
else if (connection != null)
|
||||||
{
|
{
|
||||||
connection.on_close_click();
|
connection.on_close_click();
|
||||||
|
match_control.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,11 @@ class OnlineMatchManager
|
|||||||
|
|
||||||
this.match_button.className = "infobar-button-active";
|
this.match_button.className = "infobar-button-active";
|
||||||
|
|
||||||
|
if (this.match_state.active_player == this.local_player.get_name())
|
||||||
|
{
|
||||||
|
this.game_server_connection.notify("your turn against " + this.online_opponent.get_name());
|
||||||
|
}
|
||||||
|
|
||||||
this.is_closed = false;
|
this.is_closed = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -70,9 +75,9 @@ class OnlineMatchManager
|
|||||||
this.match_state = match_state;
|
this.match_state = match_state;
|
||||||
this.match_button.className = "infobar-button-active";
|
this.match_button.className = "infobar-button-active";
|
||||||
|
|
||||||
if (this.match_state.current_player != this.current_player_name)
|
if (this.match_state.active_player == this.local_player.get_name())
|
||||||
{
|
{
|
||||||
this.game_server_connection.notify("" + this.online_opponent.get_name() + " moved");
|
this.game_server_connection.notify("your turn against " + this.online_opponent.get_name());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,6 +232,7 @@ class WebsocketConnection
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.socket.send(JSON.stringify(msg_object));
|
this.socket.send(JSON.stringify(msg_object));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
send_match_request(player_name)
|
send_match_request(player_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user