new game styles

This commit is contained in:
ntr
2019-09-16 18:31:45 +10:00
parent e1c8a1b507
commit 16a0a18905
3 changed files with 114 additions and 151 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ function Skill(props) {
return (
<button
disabled='true'
class='construct-skill-btn disabled'>
class='construct-skill-btn disabled'>&nbsp;
</button>
);
}
+2 -8
View File
@@ -52,17 +52,11 @@ class TargetSvg extends Component {
? playerTeam.constructs.findIndex(c => c.id === cast.target_construct_id)
: otherTeam.constructs.findIndex(c => c.id === cast.target_construct_id);
const pathOffset = [
[0, -1, -2],
[1, 0, -1],
[2, 1, 0],
][source][target];
const sourceY = height;
const sourceX = (source * width / 3) + width / 6;
const sourceX = (source * width / 3) + width / 24;
const targetX = (target * width / 3) + width / 6
+ (defensive ? width / 64 : 0)
+ (pathOffset * width / 32);
+ (source * width / 18);
const targetY = defensive ? height : 0;
const bendStart = height * (0.7 - 0.1 * source);
const bendEnd = height * 0.20;