skill text in targetting area during resos

This commit is contained in:
Mashy 2019-06-12 23:51:52 +10:00
parent ee40f82f24
commit 23083dc0f5
3 changed files with 13 additions and 2 deletions

View File

@ -89,11 +89,11 @@
max-height: 10em; max-height: 10em;
} }
} }
/*
.resolving #targeting { .resolving #targeting {
opacity: 0; opacity: 0;
} }
*/
.game-construct .name { .game-construct .name {
width: 100%; width: 100%;
margin-bottom: 0.25em; margin-bottom: 0.25em;

View File

@ -36,6 +36,7 @@ class Attack extends Component {
|| (this.props.team && this.props.stage === 'END_SKILL')) { || (this.props.team && this.props.stage === 'END_SKILL')) {
anime.set('.attack-anim', { anime.set('.attack-anim', {
translateY: -250, translateY: -250,
rotateX: 180,
}); });
value = '+=250px'; value = '+=250px';
} }
@ -43,6 +44,7 @@ class Attack extends Component {
|| (this.props.team && this.props.stage === 'START_SKILL')) { || (this.props.team && this.props.stage === 'START_SKILL')) {
anime.set('.attack-anim', { anime.set('.attack-anim', {
translateY: 0, translateY: 0,
rotateX: 0,
}); });
value = '-=250px'; value = '-=250px';
} }

View File

@ -84,9 +84,18 @@ class TargetSvg extends Component {
? null ? null
: outgoing.map(getPath); : 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 ( return (
<svg id="targeting" viewBox={`0 0 ${width} ${height}`} preserveAspectRatio="none" class="targeting-arrows"> <svg id="targeting" viewBox={`0 0 ${width} ${height}`} preserveAspectRatio="none" class="targeting-arrows">
{arrows} {arrows}
{resolutionText}
</svg> </svg>
); );
} }