1
0
Fork 0

Testing a new unit hud look

This commit is contained in:
Michaël Lemaire 2020-02-24 01:02:11 +01:00
parent 65f0aa6dbf
commit 6fbd420874
6 changed files with 83 additions and 100 deletions

View File

@ -275,75 +275,75 @@ end = NodePath("../../anchors/anchor2")
[node name="anchors" type="Node2D" parent="."]
[node name="anchor" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 1500 )
position = Vector2( 540, 1440 )
[node name="anchor2" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 300, 1380 )
position = Vector2( 300, 1320 )
[node name="anchor3" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 1260 )
position = Vector2( 540, 1200 )
anchor_type = "attack_start"
[node name="anchor4" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 780, 1380 )
position = Vector2( 780, 1320 )
[node name="anchor5" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 180, 1200 )
position = Vector2( 180, 1140 )
[node name="anchor6" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 900, 1200 )
position = Vector2( 900, 1140 )
[node name="anchor7" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 960 )
position = Vector2( 540, 900 )
[node name="anchor8" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 360, 1080 )
position = Vector2( 360, 1020 )
[node name="anchor9" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 720, 1080 )
position = Vector2( 720, 1020 )
[node name="anchor10" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 120, 960 )
position = Vector2( 120, 900 )
[node name="anchor11" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 960, 960 )
position = Vector2( 960, 900 )
[node name="anchor12" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 780, 300 )
position = Vector2( 780, 240 )
[node name="anchor13" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 300, 300 )
position = Vector2( 300, 240 )
[node name="anchor14" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 900, 480 )
position = Vector2( 900, 420 )
[node name="anchor15" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 180, 480 )
position = Vector2( 180, 420 )
[node name="anchor16" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 180 )
position = Vector2( 540, 120 )
[node name="anchor17" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 960, 720 )
position = Vector2( 960, 660 )
[node name="anchor18" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 120, 720 )
position = Vector2( 120, 660 )
[node name="anchor19" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 720, 600 )
position = Vector2( 720, 540 )
[node name="anchor20" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 420 )
position = Vector2( 540, 360 )
anchor_type = "defend_start"
[node name="anchor21" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 360, 600 )
position = Vector2( 360, 540 )
[node name="anchor22" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 540, 720 )
position = Vector2( 540, 660 )
[node name="anchor23" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 300, 840 )
position = Vector2( 300, 780 )
[node name="anchor24" parent="anchors" instance=ExtResource( 1 )]
position = Vector2( 780, 840 )
position = Vector2( 780, 780 )

View File

@ -4,4 +4,5 @@
[resource]
size = 40
use_filter = true
font_data = ExtResource( 1 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -11,8 +11,8 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="300"
height="45"
viewBox="0 0 300 45.000002"
height="55"
viewBox="0 0 300 55.000002"
version="1.1"
id="svg3027"
inkscape:version="0.92.4 (f8dce91, 2019-08-02)"
@ -132,12 +132,12 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="148.49118"
inkscape:cy="41.051492"
inkscape:zoom="5.6568542"
inkscape:cx="77.104047"
inkscape:cy="39.166538"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
showgrid="true"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1056"
@ -149,7 +149,12 @@
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
fit-margin-bottom="0"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid923" />
</sodipodi:namedview>
<metadata
id="metadata3024">
<rdf:RDF>
@ -166,28 +171,20 @@
inkscape:groupmode="layer"
id="layer2"
inkscape:label="back"
transform="translate(41.952795,16.807916)">
transform="translate(41.952795,26.807916)">
<path
style="opacity:1;fill:#3a6479;fill-opacity:1;stroke:#dbeff9;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:9.29763794;stroke-opacity:1"
d="M -14.305806,27.207799 -35.513604,6.0000006 -14.305806,-15.207799 230.40021,-15.2078 251.60801,5.9999997 230.40021,27.2078 Z"
style="opacity:1;fill:#233b48;fill-opacity:1;stroke:#dbeff9;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:9.29763794;stroke-opacity:1"
d="m -31.952795,22.192084 -9,-20 v -3 l 9,-20 H 248.0472 l 9.00001,20 v 3 l -9.00001,20 z"
id="rect6561"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#dbeff9;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect9260"
width="16.567816"
height="16.567816"
x="38.472004"
y="-46.554539"
transform="rotate(45)" />
sodipodi:nodetypes="ccccccccc" />
<path
sodipodi:type="star"
style="opacity:1;fill:none;fill-opacity:1;stroke:#dbeff9;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#f9f7db;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path9262"
sodipodi:sides="3"
sodipodi:cx="-4.8828345"
sodipodi:cy="9.1870117"
sodipodi:cx="-16.882833"
sodipodi:cy="4.6131337"
sodipodi:r1="11.684199"
sodipodi:r2="5.8420992"
sodipodi:arg1="-1.5707963"
@ -195,39 +192,39 @@
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m -4.8828341,-2.4971876 5.05940596,8.7631497 5.05940704,8.7631499 -10.1188133,-10e-7 -10.1188136,0 5.0594072,-8.7631489 z"
d="m -16.882833,-7.0710654 5.059406,8.7631497 5.0594068,8.7631497 -10.1188128,-1e-6 -10.118814,0 5.059407,-8.7631487 z"
inkscape:transform-center-y="-2.9210502"
inkscape:transform-center-x="-2.4797647e-06" />
<circle
style="opacity:1;fill:none;fill-opacity:1;stroke:#dbeff9;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6, 6;stroke-dashoffset:0;stroke-opacity:1"
id="path9264"
cx="125.12853"
cy="6"
r="11.879117" />
<path
sodipodi:type="star"
style="opacity:1;fill:none;fill-opacity:1;stroke:#dbeff9;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
style="opacity:1;fill:none;fill-opacity:1;stroke:#eab3ac;stroke-width:2.95353055;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="path9266"
sodipodi:sides="7"
sodipodi:cx="190.13418"
sodipodi:cy="6.7411709"
sodipodi:r1="13.912015"
sodipodi:r2="7.7907281"
sodipodi:cx="232.13419"
sodipodi:cy="1.3949898"
sodipodi:r1="10.841722"
sodipodi:r2="6.0713639"
sodipodi:arg1="-1.5707963"
sodipodi:arg2="-1.1219973"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 190.13419,-7.1708441 3.38027,6.89281177 7.49658,-1.65479597 -3.28146,6.9403997 5.96782,4.8293144 -7.47218,1.7617252 -0.0548,7.676852 -6.03619,-4.743564 -6.0362,4.743564 -0.0548,-7.676853 -7.47218,-1.7617249 5.96782,-4.8293149 -3.28146,-6.9403991 7.49659,1.65479606 z"
inkscape:transform-center-y="-3.478004"
inkscape:transform-center-x="1.8017848e-05" />
d="m 232.13419,-9.4467317 2.63427,5.3716119 5.84213,-1.2895929 -2.55726,5.40869743 4.65076,3.76351537 -5.82312,1.3729236 -0.0427,5.9826203 -4.70405,-3.6966902 -4.70405,3.6966892 -0.0427,-5.98262 -5.82312,-1.3729234 4.65076,-3.76351577 -2.55726,-5.40869703 5.84213,1.289593 z"
inkscape:transform-center-y="-2.7104304"
inkscape:transform-center-x="1.4195404e-05" />
<path
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path925"
d="m 57.047205,27.192084 -12,-25 v -3 l 12,-25 H 159.0472 l 12,25 v 3 l -12,25 z"
style="opacity:1;fill:#3a6479;fill-opacity:1;stroke:#dbeff9;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:9.29763794;stroke-opacity:1" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="texts"
style="display:none"
transform="translate(41.952795,16.807916)">
transform="translate(41.952795,26.807916)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.37133026px;line-height:1.25;font-family:DAGGERSQUARE;-inkscape-font-specification:DAGGERSQUARE;letter-spacing:0px;word-spacing:0px;fill:#dbeff9;fill-opacity:1;stroke:none;stroke-width:0.98428321"
@ -252,7 +249,7 @@
y="0"
xlink:href="#text3714"
id="use9272"
transform="translate(131.42966)"
transform="translate(110.42966)"
width="100%"
height="100%" />
<use
@ -260,7 +257,7 @@
y="0"
xlink:href="#text3714"
id="use9274"
transform="translate(197.14448)"
transform="translate(178.0526)"
width="100%"
height="100%" />
</g>

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -23,13 +23,11 @@ func set_move(val):
func set_hull(val):
hull = val
if has_node("hud/hull"):
$hud/hull.text = String(val)
update_life()
func set_shield(val):
shield = val
if has_node("hud/shield"):
$hud/shield.text = String(val)
update_life()
func set_damage(val):
damage = val
@ -49,3 +47,7 @@ func set_from(other):
set_shield(other.shield)
set_damage(other.damage)
set_enemy(other.enemy)
func update_life():
if has_node("hud/life"):
$hud/life.text = String(hull) + ((" +" + String(shield)) if shield else "")

View File

@ -24,11 +24,11 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -250.635
margin_top = -47.0
margin_right = -210.635
margin_bottom = 2.0
custom_colors/font_color = Color( 0.858824, 0.937255, 0.976471, 1 )
margin_left = -258.899
margin_top = -52.2704
margin_right = -218.899
margin_bottom = -3.27041
custom_colors/font_color = Color( 0.976471, 0.968627, 0.858824, 1 )
text = "0"
align = 1
valign = 1
@ -36,32 +36,15 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="hull" type="Label" parent="hud"]
[node name="life" type="Label" parent="hud"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -185.889
margin_top = -47.3972
margin_right = -145.889
margin_bottom = 1.60278
custom_colors/font_color = Color( 0.858824, 0.937255, 0.976471, 1 )
text = "0"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="shield" type="Label" parent="hud"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -122.334
margin_top = -47.0
margin_right = -82.3343
margin_bottom = 2.0
margin_left = -197.264
margin_top = -52.2704
margin_right = -99.2635
margin_bottom = -3.27041
custom_colors/font_color = Color( 0.858824, 0.937255, 0.976471, 1 )
text = "0"
align = 1
@ -75,11 +58,11 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -57.1911
margin_top = -47.0
margin_right = -17.1911
margin_bottom = 2.0
custom_colors/font_color = Color( 0.858824, 0.937255, 0.976471, 1 )
margin_left = -80.4546
margin_top = -52.2704
margin_right = -40.4546
margin_bottom = -3.27041
custom_colors/font_color = Color( 0.917647, 0.701961, 0.67451, 1 )
text = "0"
align = 1
valign = 1