skill text in targetting area during resos
This commit is contained in:
parent
ee40f82f24
commit
23083dc0f5
@ -89,11 +89,11 @@
|
||||
max-height: 10em;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
.resolving #targeting {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
*/
|
||||
.game-construct .name {
|
||||
width: 100%;
|
||||
margin-bottom: 0.25em;
|
||||
|
||||
@ -36,6 +36,7 @@ class Attack extends Component {
|
||||
|| (this.props.team && this.props.stage === 'END_SKILL')) {
|
||||
anime.set('.attack-anim', {
|
||||
translateY: -250,
|
||||
rotateX: 180,
|
||||
});
|
||||
value = '+=250px';
|
||||
}
|
||||
@ -43,6 +44,7 @@ class Attack extends Component {
|
||||
|| (this.props.team && this.props.stage === 'START_SKILL')) {
|
||||
anime.set('.attack-anim', {
|
||||
translateY: 0,
|
||||
rotateX: 0,
|
||||
});
|
||||
value = '-=250px';
|
||||
}
|
||||
|
||||
@ -84,9 +84,18 @@ class TargetSvg extends Component {
|
||||
? null
|
||||
: outgoing.map(getPath);
|
||||
|
||||
let skill = '';
|
||||
if (resolution) {
|
||||
if (resolution.event[1]) ([, { skill }] = resolution.event);
|
||||
}
|
||||
const resolutionText = resolution
|
||||
? <text x={`${width / 2.3}`} y={`${height / 2.3}`} font-family="Jura" font-size="2em"> {skill} </text>
|
||||
: null;
|
||||
|
||||
return (
|
||||
<svg id="targeting" viewBox={`0 0 ${width} ${height}`} preserveAspectRatio="none" class="targeting-arrows">
|
||||
{arrows}
|
||||
{resolutionText}
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user