Private
Public Access
1
0

renamed the acme to mineseeker && handle when the user connection has been lost

This commit is contained in:
2016-11-01 11:54:38 +01:00
parent a4f9b603a2
commit 6bfb08b21c
6 changed files with 26 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ class MineSeeker extends React.Component {
super(props);
var gameAssoc = props.gameId !== '' ? props.gameId : this.makeGameAssoc(50);
var channel = "acme/channel/" + gameAssoc;
var channel = "mineseeker/channel/" + gameAssoc;
this.state = {
gameInherited: props.gameId !== '',
@@ -50,7 +50,7 @@ class MineSeeker extends React.Component {
*/
session
.call(
this.state.gameInherited ? "sample/connectGame" : "sample/startGame",
this.state.gameInherited ? "mineseeker-rpc/connectGame" : "mineseeker-rpc/startGame",
this.state.gameInherited ? this.state.gameAssoc : [Base64.encode(JSON.stringify(gridClient)), this.state.gameAssoc]
)
.then(
@@ -115,6 +115,12 @@ class MineSeeker extends React.Component {
});
} else {
console.info(payload.msg);
this.refs.gridControl.setState({
overlay: true,
overlayTitle: "The connection has been lost...",
overlaySubTitle: "Please, restart the game!"
});
}
}
}