working with combat text
This commit is contained in:
@@ -10,19 +10,6 @@ const InstanceContainer = require('./instance.container');
|
||||
const addState = connect(
|
||||
state => {
|
||||
const { game, instance, ws, account } = state;
|
||||
|
||||
if (!game) {
|
||||
ws.clearGameStateTimeout();
|
||||
} else {
|
||||
ws.startGameStateTimeout(game.id);
|
||||
}
|
||||
|
||||
if (!instance) {
|
||||
ws.clearInstanceStateTimeout();
|
||||
} else {
|
||||
ws.startInstanceStateTimeout(instance.id);
|
||||
}
|
||||
|
||||
return { game, instance, account };
|
||||
}
|
||||
);
|
||||
|
||||
@@ -143,7 +143,6 @@ function GamePanel(props) {
|
||||
));
|
||||
|
||||
const combatText = getCombatText(cryp, resolution);
|
||||
|
||||
const combatTextEl = combatText
|
||||
? <div className="combat-text">{combatText}</div>
|
||||
: null;
|
||||
@@ -156,7 +155,7 @@ function GamePanel(props) {
|
||||
onClick={() => selectSkillTarget(cryp.id)} >
|
||||
<figure className="img">
|
||||
<img src={`/molecules/${genAvatar(cryp.name)}.svg`} />
|
||||
<div className="combat-text">attack</div>
|
||||
{combatTextEl}
|
||||
<div>{cryp.name}</div>
|
||||
</figure>
|
||||
<div className="stats">
|
||||
|
||||
@@ -78,6 +78,9 @@ function GameCryp(props) {
|
||||
}
|
||||
|
||||
const combatText = getCombatText(cryp, resolution);
|
||||
const combatTextEl = combatText
|
||||
? <div className="combat-text">{combatText}</div>
|
||||
: null;
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -89,6 +92,7 @@ function GameCryp(props) {
|
||||
className="img"
|
||||
onClick={() => selectSkillTarget(cryp.id)} >
|
||||
<img src={`/molecules/${genAvatar(cryp.name)}.svg`} />
|
||||
{combatTextEl}
|
||||
<div>{cryp.name}</div>
|
||||
</figure>
|
||||
<div className="skills">
|
||||
|
||||
Reference in New Issue
Block a user