ready rpc

This commit is contained in:
ntr
2019-04-29 19:09:16 +10:00
parent 59a22b6122
commit d3c301a3ac
5 changed files with 32 additions and 7 deletions
+6
View File
@@ -19,6 +19,7 @@ function GamePanel(props) {
setActiveCryp,
selectSkillTarget,
sendInstanceState,
sendGameReady,
activeCryp,
account,
showLog,
@@ -69,6 +70,11 @@ function GamePanel(props) {
onClick={() => toggleLog(!showLog)}>
Log
</button>
<button
className="game-back-btn instance-btn instance-ui-btn right"
onClick={() => sendGameReady()}>
Ready
</button>
</div>
);
+5
View File
@@ -23,6 +23,10 @@ const addState = connect(
return false;
}
function sendGameReady() {
ws.sendGameReady(game.id);
}
function sendInstanceState(instanceId) {
if (!instanceId) return false;
return ws.sendInstanceState(instanceId);
@@ -42,6 +46,7 @@ const addState = connect(
activeCryp,
selectSkillTarget,
sendInstanceState,
sendGameReady,
};
},