ko
This commit is contained in:
parent
56b0a7f890
commit
27473ffdd5
@ -51,7 +51,7 @@ button:hover {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0.5em;
|
margin: 0.5em;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 2px solid whitesmoke;
|
border-width: 2px solid whitesmoke;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background {
|
.background {
|
||||||
@ -314,6 +314,11 @@ button:hover {
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.game-cryp-ctr.ko {
|
||||||
|
animation: none;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
.stack {
|
.stack {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
|
|||||||
@ -48,6 +48,8 @@ function GamePanel(props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Cryp(cryp) {
|
function Cryp(cryp) {
|
||||||
|
const ko = cryp.hp.value === 0 ? 'ko' : '';
|
||||||
|
|
||||||
const skills = range(0, 4).map(i => {
|
const skills = range(0, 4).map(i => {
|
||||||
const s = cryp.skills[i];
|
const s = cryp.skills[i];
|
||||||
if (!s) {
|
if (!s) {
|
||||||
@ -72,10 +74,10 @@ function GamePanel(props) {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={i}
|
key={i}
|
||||||
disabled={!!cdText}
|
disabled={!!cdText || ko}
|
||||||
className={`cryp-skill-btn ${highlight ? 'active' : ''}`}
|
className={`cryp-skill-btn ${highlight ? 'active' : ''}`}
|
||||||
type="submit"
|
type="submit"
|
||||||
onClick={() => setActiveSkill(cryp.id, s)}>
|
onClick={() => setActiveSkill(cryp.id, s.skill)}>
|
||||||
{s.skill} {cdText}
|
{s.skill} {cdText}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
@ -94,8 +96,9 @@ function GamePanel(props) {
|
|||||||
</figure>
|
</figure>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="game-cryp-ctr" >
|
<div className={`game-cryp-ctr ${ko}`} >
|
||||||
<div
|
<div
|
||||||
key={cryp.id}
|
key={cryp.id}
|
||||||
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user