Fixed visual effects for repel action
This commit is contained in:
parent
1d70a18703
commit
d3cbcb0c04
|
@ -282,6 +282,33 @@
|
|||
x2="503.60327"
|
||||
y2="27.135599"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4662-5"
|
||||
x="-0.22430319"
|
||||
width="1.4486064"
|
||||
y="-0.05723583"
|
||||
height="1.1144717"
|
||||
inkscape:label="Neon blur">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="0.20000000000000001"
|
||||
id="feGaussianBlur4664-3" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter4941"
|
||||
x="-0.024032624"
|
||||
width="1.0480652"
|
||||
y="-0.44453457"
|
||||
height="1.8890691">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="1.5838776"
|
||||
id="feGaussianBlur4943" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
|
@ -291,8 +318,8 @@
|
|||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.70000001"
|
||||
inkscape:cx="921.73937"
|
||||
inkscape:cy="523.01763"
|
||||
inkscape:cx="869.7316"
|
||||
inkscape:cy="490.44972"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
|
@ -415,15 +442,7 @@
|
|||
transform="matrix(3.0721311,0,0,3.0721311,-6.6877028,-512.5613)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#283646;stroke-width:2.86500001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:15.75749969;stroke-opacity:1;marker-start:url(#Arrow1Send);marker-end:url(#Arrow2Sstart)"
|
||||
d="M 208.51855,143.75099 H 379.83832"
|
||||
id="path5290"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<text
|
||||
|
@ -432,7 +451,7 @@
|
|||
x="216.48831"
|
||||
y="198.11024"
|
||||
id="text4525"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"><tspan
|
||||
sodipodi:role="line"
|
||||
|
@ -446,7 +465,7 @@
|
|||
x="122.79533"
|
||||
y="134.41782"
|
||||
id="text4529"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"><tspan
|
||||
sodipodi:role="line"
|
||||
|
@ -454,34 +473,10 @@
|
|||
x="122.79533"
|
||||
y="134.41782"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56.44444656px;line-height:6.61000013px;font-family:DAGGERSQUARE;-inkscape-font-specification:DAGGERSQUARE;fill:url(#radialGradient5288);fill-opacity:1;stroke:url(#linearGradient5254);stroke-width:0.96499997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">SpaceTac</tspan></text>
|
||||
<ellipse
|
||||
style="fill:#19232c;fill-opacity:1;stroke:#1a2e44;stroke-width:0.60000002;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:59.55590439;stroke-opacity:1"
|
||||
id="path6915"
|
||||
cx="299.03043"
|
||||
cy="143.76476"
|
||||
rx="75.166008"
|
||||
ry="3.60095"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#b2b2b2;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="227.21475"
|
||||
y="146.65189"
|
||||
id="text4550"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4548"
|
||||
x="227.21475"
|
||||
y="146.65189"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DAGGERSQUARE;-inkscape-font-specification:DAGGERSQUARE;fill:#b2b2b2;fill-opacity:1;stroke-width:0.26458332px">a tactical turn-based RPG</tspan></text>
|
||||
<g
|
||||
id="g7596"
|
||||
transform="translate(-1.0583333)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<circle
|
||||
|
@ -513,7 +508,7 @@
|
|||
transform="matrix(-1,0,0,1,510.43903,0)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<use
|
||||
|
@ -524,7 +519,7 @@
|
|||
transform="translate(75.629323)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<use
|
||||
|
@ -535,7 +530,7 @@
|
|||
transform="translate(0,29.108755)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<path
|
||||
|
@ -544,9 +539,60 @@
|
|||
id="path7605"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title1.png"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<g
|
||||
id="g4655"
|
||||
style="opacity:0.681;filter:url(#filter4941)"
|
||||
transform="matrix(1.0387609,0,0,1.0387609,-11.319955,-5.7416791)"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<g
|
||||
transform="translate(3.1750217)"
|
||||
id="g4649">
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4624-5"
|
||||
d="m 214.05406,135.67491 -6.35681,24.91189"
|
||||
style="display:inline;fill:none;fill-rule:evenodd;stroke:#b2b2b2;stroke-width:1.99020624;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4662-5)"
|
||||
transform="matrix(0.34325798,0,0,0.34325798,138.4909,97.283756)" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#path4624-5"
|
||||
id="use4643"
|
||||
width="100%"
|
||||
height="100%"
|
||||
transform="matrix(-1,0,0,1,577.74203,0)" />
|
||||
</g>
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4645"
|
||||
d="M 218.34067,152.47825 H 365.7514"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#b2b2b2;stroke-width:0.63499999;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
|
||||
<path
|
||||
style="opacity:1;fill:none;fill-rule:evenodd;stroke:#568ac7;stroke-width:2.13810396;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.68723402"
|
||||
d="M 219.6711,147.2458 H 364.42097"
|
||||
id="path4945"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#8fa5be;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
x="217.4566"
|
||||
y="147.73351"
|
||||
id="text4550"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/out/assets/images/menu/title.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4548"
|
||||
x="217.4566"
|
||||
y="147.73351"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:DAGGERSQUARE;-inkscape-font-specification:DAGGERSQUARE;letter-spacing:0.71172917px;fill:#8fa5be;fill-opacity:1;stroke-width:0.26458332px;">a tactical turn-based RPG</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
|
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB |
Binary file not shown.
Before Width: | Height: | Size: 213 KiB After Width: | Height: | Size: 216 KiB |
|
@ -159,8 +159,9 @@ module TS.SpaceTac.UI {
|
|||
|
||||
let blast_radius = this.weapon.action.getBlastRadius(this.ship);
|
||||
|
||||
let projectile_duration = arenaDistance(this.source, this.destination) * 1.5;
|
||||
let tween = this.ui.tweens.create(missile);
|
||||
tween.to({ x: this.destination.x, y: this.destination.y }, 1000);
|
||||
tween.to({ x: this.destination.x, y: this.destination.y }, projectile_duration || 1);
|
||||
tween.onComplete.addOnce(() => {
|
||||
missile.destroy();
|
||||
if (blast_radius > 0) {
|
||||
|
@ -180,18 +181,20 @@ module TS.SpaceTac.UI {
|
|||
});
|
||||
tween.start();
|
||||
|
||||
if (blast_radius > 0) {
|
||||
let ships = this.arena.getShipsInCircle(new ArenaCircleArea(this.destination.x, this.destination.y, blast_radius));
|
||||
ships.forEach(sprite => {
|
||||
if (sprite.getValue("shield") > 0) {
|
||||
this.shieldImpactEffect(this.target, sprite, 1200, 800);
|
||||
} else {
|
||||
this.hullImpactEffect(this.target, sprite, 1200, 400);
|
||||
}
|
||||
});
|
||||
if (blast_radius > 0 && this.weapon.action instanceof FireWeaponAction) {
|
||||
if (any(this.weapon.action.effects, effect => effect instanceof DamageEffect)) {
|
||||
let ships = this.arena.getShipsInCircle(new ArenaCircleArea(this.destination.x, this.destination.y, blast_radius));
|
||||
ships.forEach(sprite => {
|
||||
if (sprite.getValue("shield") > 0) {
|
||||
this.shieldImpactEffect(this.target, sprite, 1200, 800);
|
||||
} else {
|
||||
this.hullImpactEffect(this.target, sprite, 1200, 400);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return 1000 + (blast_radius ? 1500 : 0);
|
||||
return projectile_duration + (blast_radius ? 1500 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue