Add theme to tower healthbar

This commit is contained in:
Moe Poi ~ 2023-10-25 16:47:44 +07:00
parent be6792d53f
commit 763ccf22e2
7 changed files with 29 additions and 7 deletions

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=14 format=3 uid="uid://bexddlltacp6k"]
[gd_scene load_steps=15 format=3 uid="uid://bexddlltacp6k"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_decej"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_gelth"]
[ext_resource type="AudioStream" uid="uid://bx4oba7yo6duu" path="res://assets/audio/cannon.mp3" id="3_h4ljg"]
[ext_resource type="Texture2D" uid="uid://2ovf2ymtftgo" path="res://assets/spritesheets/towers/cannon-1.png" id="3_q7708"]
@ -91,13 +92,13 @@ shape = SubResource("CircleShape2D_wmsbt")
one_shot = true
[node name="HealthBar" type="ProgressBar" parent="."]
modulate = Color(0.431373, 0.815686, 0, 1)
offset_left = 4.0
offset_top = -15.0
offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_gelth")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=14 format=3 uid="uid://dij57511gfg4t"]
[gd_scene load_steps=15 format=3 uid="uid://dij57511gfg4t"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_eyei4"]
[ext_resource type="AudioStream" uid="uid://bx4oba7yo6duu" path="res://assets/audio/cannon.mp3" id="3_cih6o"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_iouuw"]
[ext_resource type="Texture2D" uid="uid://br7wgq61n6ufv" path="res://assets/spritesheets/towers/cannon-2.png" id="3_us71t"]
[sub_resource type="AtlasTexture" id="AtlasTexture_74asi"]
@ -97,6 +98,7 @@ offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_iouuw")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

View file

@ -1,6 +1,7 @@
[gd_scene load_steps=14 format=3 uid="uid://mxre00inxhlf"]
[gd_scene load_steps=15 format=3 uid="uid://mxre00inxhlf"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_pa8xy"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_hrtp8"]
[ext_resource type="AudioStream" uid="uid://bx4oba7yo6duu" path="res://assets/audio/cannon.mp3" id="3_r4bfa"]
[ext_resource type="Texture2D" uid="uid://by4hjrjfcxsdl" path="res://assets/spritesheets/towers/cannon-3.png" id="3_tjfbt"]
@ -97,6 +98,7 @@ offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_hrtp8")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=14 format=3 uid="uid://biyhuyx177dw8"]
[gd_scene load_steps=15 format=3 uid="uid://biyhuyx177dw8"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_8623k"]
[ext_resource type="AudioStream" uid="uid://0c62t5vtlwh6" path="res://assets/audio/railgun.mp3" id="3_ixlr3"]
[ext_resource type="Texture2D" uid="uid://c02ebkmjpxium" path="res://assets/spritesheets/towers/railgun-1.png" id="3_vo8au"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_w0gkh"]
[sub_resource type="AtlasTexture" id="AtlasTexture_60mof"]
atlas = ExtResource("3_vo8au")
@ -98,6 +99,7 @@ offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_w0gkh")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=14 format=3 uid="uid://ctnlfsnc2gl03"]
[gd_scene load_steps=15 format=3 uid="uid://ctnlfsnc2gl03"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_rnv08"]
[ext_resource type="Texture2D" uid="uid://b0dawx5rlcyo3" path="res://assets/spritesheets/towers/railgun-2.png" id="3_aeasn"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_o0ivr"]
[ext_resource type="AudioStream" uid="uid://0c62t5vtlwh6" path="res://assets/audio/railgun.mp3" id="3_x4pda"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fss1a"]
@ -97,6 +98,7 @@ offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_o0ivr")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

View file

@ -1,8 +1,9 @@
[gd_scene load_steps=14 format=3 uid="uid://cfelbpijg3dp0"]
[gd_scene load_steps=15 format=3 uid="uid://cfelbpijg3dp0"]
[ext_resource type="Script" path="res://scripts/towers/tower.gd" id="1_3s425"]
[ext_resource type="AudioStream" uid="uid://0c62t5vtlwh6" path="res://assets/audio/railgun.mp3" id="3_f25ix"]
[ext_resource type="Texture2D" uid="uid://dk3toqlc7igld" path="res://assets/spritesheets/towers/railgun-3.png" id="3_g5gi2"]
[ext_resource type="Theme" uid="uid://ciywhmrj7l712" path="res://themes/health_bar.tres" id="3_sher0"]
[sub_resource type="AtlasTexture" id="AtlasTexture_g3wst"]
atlas = ExtResource("3_g5gi2")
@ -97,6 +98,7 @@ offset_right = 106.0
offset_bottom = 12.0
rotation = 1.5708
scale = Vector2(0.3, 0.3)
theme = ExtResource("3_sher0")
show_percentage = false
[node name="Shoot" type="AudioStreamPlayer2D" parent="."]

11
themes/health_bar.tres Normal file
View file

@ -0,0 +1,11 @@
[gd_resource type="Theme" load_steps=3 format=3 uid="uid://ciywhmrj7l712"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n65cn"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hlw7d"]
bg_color = Color(0.2, 0.913725, 0.458824, 1)
[resource]
ProgressBar/styles/background = SubResource("StyleBoxFlat_n65cn")
ProgressBar/styles/fill = SubResource("StyleBoxFlat_hlw7d")