praise it
This commit is contained in:
parent
0533cf2ca2
commit
7b51bc7ec8
@ -29,24 +29,20 @@
|
|||||||
.opponent {
|
.opponent {
|
||||||
grid-area: opponent;
|
grid-area: opponent;
|
||||||
|
|
||||||
.combat-text {
|
|
||||||
top: 75%;
|
|
||||||
left: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.combat-anim {
|
|
||||||
top: 25%;
|
|
||||||
left: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.game-construct {
|
.game-construct {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
grid-template-rows: min-content min-content 1fr;
|
|
||||||
grid-template-columns: 1fr 2fr;
|
grid-template-columns: 1fr 2fr;
|
||||||
|
grid-template-rows: 1fr;
|
||||||
|
|
||||||
|
.right {
|
||||||
|
height: 100%;
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: min-content min-content 1fr;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"effects stats"
|
"stats"
|
||||||
"effects name"
|
"name"
|
||||||
"effects avatar";
|
"avatar";
|
||||||
|
}
|
||||||
|
|
||||||
.effects {
|
.effects {
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
@ -70,12 +66,24 @@
|
|||||||
|
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
|
|
||||||
grid-template-rows: minmax(min-content, 1fr) min-content min-content;
|
grid-template-columns: 1fr 3fr;
|
||||||
grid-template-columns: 1fr 4fr;
|
|
||||||
|
.left {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 1fr 1fr;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"skills avatar"
|
"skills "
|
||||||
"effects name"
|
"effects"
|
||||||
"effects stats";
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: minmax(min-content, 1fr) min-content min-content;
|
||||||
|
grid-template-areas:
|
||||||
|
"avatar"
|
||||||
|
"name"
|
||||||
|
"stats";
|
||||||
|
}
|
||||||
|
|
||||||
transition-property: translate, opacity;
|
transition-property: translate, opacity;
|
||||||
transition-duration: 0.25s;
|
transition-duration: 0.25s;
|
||||||
@ -117,23 +125,6 @@
|
|||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ko {
|
|
||||||
animation: none;
|
|
||||||
opacity: 0.20;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ko button:hover {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unfocus {
|
|
||||||
opacity: 0.35;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unfocus.ko {
|
|
||||||
opacity: 0.20;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
grid-area: stats;
|
grid-area: stats;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -157,6 +148,23 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.ko {
|
||||||
|
animation: none;
|
||||||
|
opacity: 0.20;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ko button:hover {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.unfocus {
|
||||||
|
opacity: 0.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.unfocus.ko {
|
||||||
|
opacity: 0.20;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1500px) {
|
@media (max-width: 1500px) {
|
||||||
@ -187,29 +195,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.combat-text {
|
|
||||||
font-size: 2em;
|
|
||||||
font-family: 'Jura';
|
|
||||||
position: absolute;
|
|
||||||
top: 5%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.combat-text svg {
|
|
||||||
height: 7em;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.combat-anim {
|
.combat-anim {
|
||||||
font-size: 2em;
|
|
||||||
font-family: 'Jura';
|
|
||||||
position: absolute;
|
|
||||||
object-fit: contain;
|
|
||||||
top: 15%;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.combat-anim svg {
|
.combat-anim svg {
|
||||||
height: 7em;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ const banish = require('./anims/banish');
|
|||||||
const idleAnimation = require('./anims/idle');
|
const idleAnimation = require('./anims/idle');
|
||||||
const invert = require('./anims/invert');
|
const invert = require('./anims/invert');
|
||||||
const sourceCast = require('./anims/source.cast');
|
const sourceCast = require('./anims/source.cast');
|
||||||
|
const { ConstructAnimation } = require('./animations');
|
||||||
|
|
||||||
const addState = connect(
|
const addState = connect(
|
||||||
function receiveState(state) {
|
function receiveState(state) {
|
||||||
@ -27,12 +28,14 @@ class ConstructAvatar extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { construct } = this.props;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class="avatar"
|
class="avatar"
|
||||||
id={this.props.construct.id}
|
id={construct.id}
|
||||||
style={{ 'background-image': `url(/imgs/${this.props.construct.img}.svg)` }}
|
style={{ 'background-image': `url(/imgs/${construct.img}.svg)` }}>
|
||||||
/>
|
<ConstructAnimation construct={construct} />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,13 +97,13 @@ const addStateText = connect(
|
|||||||
|
|
||||||
function constructText(props) {
|
function constructText(props) {
|
||||||
const { construct, animText } = props;
|
const { construct, animText } = props;
|
||||||
if (!construct || !animText) return false;
|
if (!construct) return false;
|
||||||
|
|
||||||
const text = animText.constructId === construct.id
|
const text = animText && animText.constructId === construct.id
|
||||||
? animText.text
|
? animText.text
|
||||||
: null;
|
: construct.name;
|
||||||
|
|
||||||
return <div class={'combat-text'}>{text}</div>;
|
return <h3 class={'name'}>{text}</h3>;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@ -5,7 +5,6 @@ const range = require('lodash/range');
|
|||||||
|
|
||||||
const { STATS } = require('../utils');
|
const { STATS } = require('../utils');
|
||||||
const { ConstructAvatar, ConstructText } = require('./construct');
|
const { ConstructAvatar, ConstructText } = require('./construct');
|
||||||
const { ConstructAnimation } = require('./animations');
|
|
||||||
const shapes = require('./shapes');
|
const shapes = require('./shapes');
|
||||||
|
|
||||||
const SkillBtn = require('./skill.btn');
|
const SkillBtn = require('./skill.btn');
|
||||||
@ -106,13 +105,15 @@ class GameConstruct extends Component {
|
|||||||
onClick={() => selectSkillTarget(construct.id)}
|
onClick={() => selectSkillTarget(construct.id)}
|
||||||
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
||||||
class={`game-construct ${ko} ${classes}`} >
|
class={`game-construct ${ko} ${classes}`} >
|
||||||
<h3 class="name"> {construct.name} </h3>
|
<div class="left">
|
||||||
{crypSkills}
|
{crypSkills}
|
||||||
|
<div class="effects"> {effects} </div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
<div class="stats"> {stats} </div>
|
<div class="stats"> {stats} </div>
|
||||||
<ConstructAvatar construct={construct} />
|
<ConstructAvatar construct={construct} />
|
||||||
<ConstructAnimation construct={construct} />
|
|
||||||
<ConstructText construct={construct} />
|
<ConstructText construct={construct} />
|
||||||
<div class="effects"> {effects} </div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user