rename ability to skill
This commit is contained in:
@@ -5,15 +5,15 @@ const Game = require('./game');
|
||||
const addState = connect(
|
||||
function receiveState(state) {
|
||||
const { ws, game, account } = state;
|
||||
function sendGameAbility(crypId, targetTeamId, ability) {
|
||||
return ws.sendGameAbility(game.id, crypId, targetTeamId, ability);
|
||||
function sendGameSkill(crypId, targetTeamId, skill) {
|
||||
return ws.sendGameSkill(game.id, crypId, targetTeamId, skill);
|
||||
}
|
||||
|
||||
function sendGameTarget(crypId, abilityId) {
|
||||
return ws.sendGameTarget(game.id, crypId, abilityId);
|
||||
function sendGameTarget(crypId, skillId) {
|
||||
return ws.sendGameTarget(game.id, crypId, skillId);
|
||||
}
|
||||
|
||||
return { game, account, sendGameAbility, sendGameTarget };
|
||||
return { game, account, sendGameSkill, sendGameTarget };
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const preact = require('preact');
|
||||
|
||||
function GamePanel({ game, sendGameAbility, sendGameTarget, account }) {
|
||||
function GamePanel({ game, sendGameSkill, sendGameTarget, account }) {
|
||||
if (!game) return <div>...</div>;
|
||||
|
||||
const otherTeams = game.teams.filter(t => t.id !== account.id);
|
||||
@@ -23,7 +23,7 @@ function GamePanel({ game, sendGameAbility, sendGameTarget, account }) {
|
||||
<button
|
||||
className="button is-dark is-fullwidth"
|
||||
type="submit"
|
||||
onClick={() => sendGameAbility(c.id, otherTeams[0].id, 'Attack')}>
|
||||
onClick={() => sendGameSkill(c.id, otherTeams[0].id, 'Attack')}>
|
||||
Attack
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user