Wall implemented
This commit is contained in:
@ -92,12 +92,12 @@ func adjust_health_bar() -> void:
|
||||
bg_style.corner_radius_bottom_right = 20
|
||||
|
||||
if current_shield > 0:
|
||||
fill_style.bg_color = Color(0, 0, 1) # Blue for shield
|
||||
bg_style.bg_color = Color(0, 1, 0) # Green background
|
||||
health_bar.value = int((current_shield / float(shield)) * 100) # Use current_shield and shield
|
||||
fill_style.bg_color = Color(0, 0, 1)
|
||||
bg_style.bg_color = Color(0, 1, 0)
|
||||
health_bar.value = int((current_shield / float(shield)) * 100)
|
||||
else:
|
||||
fill_style.bg_color = Color(0, 1, 0) # Green for health
|
||||
bg_style.bg_color = Color(1, 0, 0) # Red background
|
||||
fill_style.bg_color = Color(0, 1, 0)
|
||||
bg_style.bg_color = Color(1, 0, 0)
|
||||
health_bar.value = int((current_health / float(health)) * 100)
|
||||
|
||||
# Apply the styles
|
||||
@ -137,7 +137,7 @@ func Collision_Handler(body: Node2D):
|
||||
if i.get_parent().name.contains(j):
|
||||
enemy_hurt(100)
|
||||
body.get_parent().Explode_Mine()
|
||||
|
||||
|
||||
|
||||
func get_progress():
|
||||
return get_parent().get_progress()
|
||||
|
Reference in New Issue
Block a user