renamed the acme to mineseeker && handle when the user connection has been lost
This commit is contained in:
@@ -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!"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user