Health bar adjustments
This commit is contained in:
@ -94,9 +94,17 @@ animations = [{
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0gjha"]
|
||||
bg_color = Color(1, 0, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c3t52"]
|
||||
bg_color = Color(0, 1, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[node name="Cobold" type="Node2D"]
|
||||
script = ExtResource("1_ssdee")
|
||||
|
@ -63,5 +63,12 @@ func set_character_data():
|
||||
|
||||
func adjust_health_bar() -> void:
|
||||
var health_bar = get_node("ProgressBar")
|
||||
health_bar.value = health / current_health * 100
|
||||
if current_shield > 0:
|
||||
health_bar.get("theme_override_styles/fill").bg_color = Color(0,0,1)
|
||||
health_bar.get("theme_override_styles/background").bg_color = Color(0,1,0)
|
||||
health_bar.value = shield / current_shield * 100
|
||||
else:
|
||||
health_bar.get("theme_override_styles/fill").bg_color = Color(0,1,0)
|
||||
health_bar.get("theme_override_styles/background").bg_color = Color(1,0,0)
|
||||
health_bar.value = health / current_health * 100
|
||||
pass
|
||||
|
@ -95,9 +95,17 @@ animations = [{
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pq2md"]
|
||||
bg_color = Color(1, 0, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gxpsl"]
|
||||
bg_color = Color(0, 1, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[node name="Forkman" type="Node2D"]
|
||||
script = ExtResource("1_pq2md")
|
||||
|
@ -94,9 +94,17 @@ animations = [{
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n3bbi"]
|
||||
bg_color = Color(1, 0, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2ea55"]
|
||||
bg_color = Color(0, 1, 0, 1)
|
||||
corner_radius_top_left = 20
|
||||
corner_radius_top_right = 20
|
||||
corner_radius_bottom_right = 20
|
||||
corner_radius_bottom_left = 20
|
||||
|
||||
[node name="Ork" type="Node2D"]
|
||||
script = ExtResource("1_1ecd4")
|
||||
|
Reference in New Issue
Block a user