WIP
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3 KiB |
|
@ -16,7 +16,7 @@
|
|||
viewBox="0 0 1920 1080"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.3 (3ce5693, 2018-03-11)"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||
sodipodi:docname="battle.svg"
|
||||
inkscape:export-filename="/home/michael/workspace/perso/spacetac/graphics/exported/battle/actionbar/power-generated.png"
|
||||
inkscape:export-xdpi="96"
|
||||
|
@ -25,6 +25,22 @@
|
|||
enable-background="new">
|
||||
<defs
|
||||
id="defs4">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient6648">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop6644" />
|
||||
<stop
|
||||
id="stop6932"
|
||||
offset="0.40125367"
|
||||
style="stop-color:#ffffff;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop6646" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient1887">
|
||||
|
@ -2329,6 +2345,194 @@
|
|||
stdDeviation="9.6249985"
|
||||
id="feGaussianBlur4859" />
|
||||
</filter>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient6648"
|
||||
id="radialGradient6944"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-398.39552,-201.98424)"
|
||||
cx="1591.6974"
|
||||
cy="-43.974976"
|
||||
fx="1591.6974"
|
||||
fy="-43.974976"
|
||||
r="148.69818" />
|
||||
<mask
|
||||
maskUnits="userSpaceOnUse"
|
||||
id="mask6940">
|
||||
<circle
|
||||
style="display:inline;opacity:1;fill:url(#radialGradient6944);fill-opacity:1;stroke:none;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:39.15209961;stroke-opacity:1;enable-background:new"
|
||||
id="circle6942"
|
||||
cx="1193.3018"
|
||||
cy="-245.95921"
|
||||
r="148.69818"
|
||||
mask="none" />
|
||||
</mask>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB;"
|
||||
inkscape:label="Colorize"
|
||||
id="filter6986"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1"
|
||||
height="1">
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
operator="arithmetic"
|
||||
k1="0"
|
||||
k2="0"
|
||||
result="composite1"
|
||||
id="feComposite6972" />
|
||||
<feColorMatrix
|
||||
in="composite1"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix1"
|
||||
id="feColorMatrix6974" />
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(255,221,75)"
|
||||
result="flood1"
|
||||
id="feFlood6976" />
|
||||
<feBlend
|
||||
in="flood1"
|
||||
in2="colormatrix1"
|
||||
mode="lighten"
|
||||
result="blend1"
|
||||
id="feBlend6978" />
|
||||
<feBlend
|
||||
in2="blend1"
|
||||
mode="screen"
|
||||
result="blend2"
|
||||
id="feBlend6980" />
|
||||
<feColorMatrix
|
||||
in="blend2"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix2"
|
||||
id="feColorMatrix6982" />
|
||||
<feComposite
|
||||
in="colormatrix2"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
k2="1"
|
||||
result="composite2"
|
||||
id="feComposite6984" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB;"
|
||||
inkscape:label="Colorize"
|
||||
id="filter7004"
|
||||
height="1"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1">
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
operator="arithmetic"
|
||||
k1="0"
|
||||
k2="0"
|
||||
result="composite1"
|
||||
id="feComposite6990" />
|
||||
<feColorMatrix
|
||||
in="composite1"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix1"
|
||||
id="feColorMatrix6992" />
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(255,103,75)"
|
||||
result="flood1"
|
||||
id="feFlood6994" />
|
||||
<feBlend
|
||||
in="flood1"
|
||||
in2="colormatrix1"
|
||||
mode="lighten"
|
||||
result="blend1"
|
||||
id="feBlend6996" />
|
||||
<feBlend
|
||||
in2="blend1"
|
||||
mode="screen"
|
||||
result="blend2"
|
||||
id="feBlend6998" />
|
||||
<feColorMatrix
|
||||
in="blend2"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix2"
|
||||
id="feColorMatrix7000" />
|
||||
<feComposite
|
||||
in="colormatrix2"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
k2="1"
|
||||
result="composite2"
|
||||
id="feComposite7002" />
|
||||
</filter>
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB;"
|
||||
inkscape:label="Colorize"
|
||||
id="filter7070"
|
||||
x="0"
|
||||
y="0"
|
||||
width="1"
|
||||
height="1">
|
||||
<feComposite
|
||||
in2="SourceGraphic"
|
||||
operator="arithmetic"
|
||||
k1="0"
|
||||
k2="0"
|
||||
result="composite1"
|
||||
id="feComposite7056" />
|
||||
<feColorMatrix
|
||||
in="composite1"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix1"
|
||||
id="feColorMatrix7058" />
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(109,152,129)"
|
||||
result="flood1"
|
||||
id="feFlood7060" />
|
||||
<feBlend
|
||||
in="flood1"
|
||||
in2="colormatrix1"
|
||||
mode="lighten"
|
||||
result="blend1"
|
||||
id="feBlend7062" />
|
||||
<feBlend
|
||||
in2="blend1"
|
||||
mode="screen"
|
||||
result="blend2"
|
||||
id="feBlend7064" />
|
||||
<feColorMatrix
|
||||
in="blend2"
|
||||
values="1"
|
||||
type="saturate"
|
||||
result="colormatrix2"
|
||||
id="feColorMatrix7066" />
|
||||
<feComposite
|
||||
in="colormatrix2"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
k2="1"
|
||||
result="composite2"
|
||||
id="feComposite7068" />
|
||||
</filter>
|
||||
<filter
|
||||
inkscape:collect="always"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
id="filter7112"
|
||||
x="-0.16682267"
|
||||
width="1.3336453"
|
||||
y="-0.19263023"
|
||||
height="1.3852605">
|
||||
<feGaussianBlur
|
||||
inkscape:collect="always"
|
||||
stdDeviation="13.24405"
|
||||
id="feGaussianBlur7114" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
|
@ -2337,11 +2541,11 @@
|
|||
borderopacity="1"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.4142135"
|
||||
inkscape:cx="785.52181"
|
||||
inkscape:cy="66.349141"
|
||||
inkscape:zoom="1.9999999"
|
||||
inkscape:cx="1336.1323"
|
||||
inkscape:cy="1051.5245"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g7598"
|
||||
inkscape:current-layer="g6948"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
showguides="false"
|
||||
|
@ -2352,7 +2556,7 @@
|
|||
inkscape:object-nodes="true"
|
||||
inkscape:snap-intersection-paths="false"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-global="false"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:showpageshadow="false"
|
||||
showborder="true"
|
||||
borderlayer="false"
|
||||
|
@ -2907,6 +3111,138 @@
|
|||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
<g
|
||||
id="g6640"
|
||||
transform="translate(-398.39556,-201.98424)">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6622"
|
||||
d="m 1519.0497,-169.80455 42.8148,74.15753"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6624"
|
||||
d="m 1621.5303,-95.64702 42.8148,-74.15752"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6626"
|
||||
d="m 1651.3631,-43.97497 h 85.6298"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6628"
|
||||
d="m 1621.5303,7.69707 42.8148,74.157527"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6630"
|
||||
d="M 1561.8645,7.697067 1519.0496,81.85459"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6632"
|
||||
d="m 1532.0317,-43.97498 h -85.6298"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#a0c6d9;stroke-width:11.69999981;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
<g
|
||||
id="g6948"
|
||||
transform="matrix(0.22087354,0,0,0.22087354,1019.9922,-46.511914)"
|
||||
inkscape:export-filename="/home/michael/workspace/spacetac/data/stage2/image/battle/hud/grid-ok.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
style="opacity:1">
|
||||
<path
|
||||
d="m 1410.9359,149.54529 -95.268,0 -47.634,-82.5045 47.634,-82.504491 95.268,5e-6 47.634,82.504495 z"
|
||||
inkscape:randomized="0"
|
||||
inkscape:rounded="0"
|
||||
inkscape:flatsided="true"
|
||||
sodipodi:arg2="1.5707963"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:r2="82.504501"
|
||||
sodipodi:r1="95.267982"
|
||||
sodipodi:cy="67.040794"
|
||||
sodipodi:cx="1363.3019"
|
||||
sodipodi:sides="6"
|
||||
id="path7074"
|
||||
style="opacity:1;fill:#5f8fa3;fill-opacity:0.46629214;stroke:none;stroke-width:22.11283493;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:39.15209961;stroke-opacity:1;filter:url(#filter7112)"
|
||||
sodipodi:type="star" />
|
||||
<use
|
||||
mask="url(#mask6940)"
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g6640"
|
||||
id="use6923"
|
||||
transform="translate(170.00008,313.00001)"
|
||||
width="100%"
|
||||
height="100%" />
|
||||
<path
|
||||
d="m 1393.1347,118.71284 -59.6657,0 -29.8329,-51.672049 29.8329,-51.672042 59.6658,3e-6 29.8328,51.672045 z"
|
||||
inkscape:randomized="0"
|
||||
inkscape:rounded="0"
|
||||
inkscape:flatsided="true"
|
||||
sodipodi:arg2="1.5707963"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:r2="51.672047"
|
||||
sodipodi:r1="59.665737"
|
||||
sodipodi:cy="67.040794"
|
||||
sodipodi:cx="1363.3019"
|
||||
sodipodi:sides="6"
|
||||
id="path6614"
|
||||
style="opacity:1;fill:#5b7786;fill-opacity:0.5;stroke:#7b99a7;stroke-width:10.30802059;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:39.15209961;stroke-opacity:1"
|
||||
sodipodi:type="star" />
|
||||
<path
|
||||
sodipodi:type="star"
|
||||
style="opacity:1;fill:#6d848f;fill-opacity:0.43539324;stroke:none;stroke-width:7.5156641;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:39.15209961;stroke-opacity:1"
|
||||
id="path6950"
|
||||
sodipodi:sides="6"
|
||||
sodipodi:cx="1363.3019"
|
||||
sodipodi:cy="67.040794"
|
||||
sodipodi:r1="32.379482"
|
||||
sodipodi:r2="28.041456"
|
||||
sodipodi:arg1="1.0471976"
|
||||
sodipodi:arg2="1.5707963"
|
||||
inkscape:flatsided="true"
|
||||
inkscape:rounded="0"
|
||||
inkscape:randomized="0"
|
||||
d="m 1379.4916,95.082249 -32.3795,-10e-7 -16.1897,-28.041455 16.1897,-28.041454 32.3795,2e-6 16.1898,28.041455 z" />
|
||||
</g>
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g6948"
|
||||
id="use6952"
|
||||
transform="translate(81.625003,269.00001)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
style="fill:#ffdd4b;fill-opacity:1;filter:url(#filter6986);opacity:0.184"
|
||||
inkscape:export-filename="/home/michael/workspace/spacetac/data/stage2/image/battle/hud/grid-power.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g6948"
|
||||
id="use6954"
|
||||
transform="translate(137.75001,269.00001)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
style="filter:url(#filter7004);opacity:0.145"
|
||||
inkscape:export-filename="/home/michael/workspace/spacetac/data/stage2/image/battle/hud/grid-invalid.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g6948"
|
||||
id="use7038"
|
||||
transform="translate(25.500001,269.00001)"
|
||||
width="100%"
|
||||
height="100%"
|
||||
style="opacity:0.344;filter:url(#filter7070)"
|
||||
inkscape:export-filename="/home/michael/workspace/spacetac/data/stage2/image/battle/hud/grid-ok.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
|
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 289 KiB |
|
@ -11,10 +11,10 @@ if (typeof window != "undefined") {
|
|||
// In node, does not extend Phaser classes
|
||||
var handler = {
|
||||
get(target: any, name: any): any {
|
||||
return new Proxy({}, handler);
|
||||
return new Proxy(function () { }, handler);
|
||||
}
|
||||
}
|
||||
global.Phaser = new Proxy({}, handler);
|
||||
global.Phaser = new Proxy(function () { }, handler);
|
||||
}
|
||||
|
||||
if (typeof module != "undefined") {
|
||||
|
|
|
@ -53,6 +53,9 @@ module TK.SpaceTac.UI {
|
|||
builder = builder.in(this.container);
|
||||
|
||||
// Visual effects
|
||||
this.grid_ok = builder.batch({ image: "battle-hud-grid-ok", x: -32, y: -28 });
|
||||
this.grid_power = builder.batch({ image: "battle-hud-grid-power", x: -32, y: -28 });
|
||||
this.grid_invalid = builder.batch({ image: "battle-hud-grid-invalid", x: -32, y: -28 });
|
||||
this.impact_area = builder.graphics("impact-area", 0, 0, false);
|
||||
this.diffs_move = builder.graphics("effects-move");
|
||||
this.drawn_info = builder.graphics("lines", 0, 0, false);
|
||||
|
@ -63,9 +66,6 @@ module TK.SpaceTac.UI {
|
|||
this.fire_arrow.setOrigin(1, 0.5);
|
||||
this.fire_arrow.setVisible(false);
|
||||
this.impact_indicators = builder.container("impact-indicators", 0, 0, false);
|
||||
this.grid_ok = builder.batch({ image: "battle-hud-grid-ok", x: -24, y: -20 });
|
||||
this.grid_power = builder.batch({ image: "battle-hud-grid-power", x: -24, y: -20 });
|
||||
this.grid_invalid = builder.batch({ image: "battle-hud-grid-invalid", x: -24, y: -20 });
|
||||
|
||||
// TODO Find a prettier solution
|
||||
(<any>this.container).preUpdate = () => this.updateGridIndicators(true);
|
||||
|
@ -271,11 +271,7 @@ module TK.SpaceTac.UI {
|
|||
return [loc, simulator.simulateAction(action, target)];
|
||||
})[Symbol.iterator]();
|
||||
} else {
|
||||
let battle = nn(this.ship.getBattle());
|
||||
this.grid_work = imap(battle.iships(true), (iship): [IArenaLocation, MoveFireResult] => {
|
||||
let target = Target.newFromShip(iship);
|
||||
return [iship.location, simulator.simulateAction(action, target)];
|
||||
})[Symbol.iterator]();
|
||||
this.grid_work = IATEND;
|
||||
}
|
||||
} else {
|
||||
this.grid_work = IATEND;
|
||||
|
|