Decoration and some adjusting

This commit is contained in:
2025-07-30 01:13:35 +02:00
parent a69b40132a
commit 580b5597e2
264 changed files with 5542 additions and 44 deletions

View File

@ -70,7 +70,7 @@ func target_reached() -> void:
target.get_parent().adjust_speed_of_animation()
pass
if name.contains("Magic"):
if randf() < 0.5:
if randf() < 0.1:
target.get_parent().set_progress(max(target.get_parent().get_progress() - 60, 0))
target.get_parent().enemy_hurt(hitpoint)

File diff suppressed because it is too large Load Diff

View File

@ -3,5 +3,10 @@ extends Control
func _on_button_pressed() -> void:
get_tree().change_scene_to_file("res://Game/Menu/main.tscn")
pass # Replace with function body.
func _on_button_map1_pressed() -> void:
get_tree().change_scene_to_file("res://Game/Maps/map_1.tscn")
pass # Replace with function body.

View File

@ -1 +1 @@
uid://y5h2sfhsyn7f
uid://duhi4pfoa45j1

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=14 format=3 uid="uid://cxet2lvdco2ak"]
[ext_resource type="Script" uid="uid://y5h2sfhsyn7f" path="res://Game/Menu/mapselector.gd" id="1_cnef1"]
[ext_resource type="Script" uid="uid://duhi4pfoa45j1" path="res://Game/Menu/mapselector.gd" id="1_cnef1"]
[ext_resource type="Texture2D" uid="uid://bgy114b67j3kg" path="res://Assets/Others/8-bit-graphics-pixels-scene-with-castle.jpg" id="1_jteil"]
[ext_resource type="FontFile" uid="uid://bu44ne346ymoe" path="res://Assets/Others/Canterbury.ttf" id="2_2uj2s"]
[ext_resource type="Texture2D" uid="uid://cheweipqa125e" path="res://Assets/Maps/map1.png" id="3_2uj2s"]
@ -156,4 +156,5 @@ theme_override_styles/pressed = SubResource("StyleBoxFlat_udeaf")
theme_override_styles/normal = SubResource("StyleBoxFlat_5yqcp")
text = "Main Menu"
[connection signal="pressed" from="VBoxContainer/HBoxContainer/first/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/first/Button" to="." method="_on_button_map1_pressed"]
[connection signal="pressed" from="HBoxContainer/MarginContainer/Button" to="." method="_on_button_pressed"]

View File

@ -61,11 +61,11 @@ func set_properties() -> void:
bulletSpeed = 600
hitpoint = 25
if self.name.contains("WizardTower"):
get_node("Timer").wait_time = 2.0
get_node("Timer").wait_time = 1.0
bulletSpeed = 450
hitpoint = 10
hitpoint = 15
if self.name.contains("MortarTower"): #??? not sure if necessary yet
get_node("Timer").wait_time = 5
get_node("Timer").wait_time = 2
hitpoint = 80
func get_if_moving_state():

View File

@ -158,4 +158,4 @@ func _on_button_2_pressed() -> void:
func _on_button_pressed() -> void:
get_tree().change_scene_to_file("res://Game/Menu/main.tscn")
get_tree().change_scene_to_file("res://Game/Menu/mapselector.tscn")

View File

@ -1,8 +1,74 @@
[gd_scene load_steps=8 format=3 uid="uid://ddn64i6logtw0"]
[gd_scene load_steps=17 format=3 uid="uid://ddn64i6logtw0"]
[ext_resource type="Script" uid="uid://c6sh5em844tx2" path="res://Game/sidepanel.gd" id="1_klyhg"]
[ext_resource type="FontFile" uid="uid://bu44ne346ymoe" path="res://Assets/Others/Canterbury.ttf" id="2_4l4p2"]
[sub_resource type="Theme" id="Theme_4l4p2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4l4p2"]
bg_color = Color(1, 1, 1, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qvqxt"]
bg_color = Color(0, 0, 0, 0.588235)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_38m4q"]
bg_color = Color(1, 1, 1, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alova"]
bg_color = Color(1, 1, 1, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_61fdc"]
bg_color = Color(1, 0.784314, 0.784314, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hbwx4"]
bg_color = Color(0.196078, 0, 0, 0.588235)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_x181f"]
bg_color = Color(1, 0.784314, 0.784314, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5rkja"]
bg_color = Color(1, 0.784314, 0.784314, 0.447059)
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
shadow_size = 5
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s7jra"]
bg_color = Color(0.6, 0.6, 0.6, 0.392157)
border_color = Color(0, 0, 0, 1)
@ -11,7 +77,7 @@ corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_qvqxt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4l4p2"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_f5es8"]
bg_color = Color(0.485703, 0.485704, 0.485703, 0.447059)
@ -67,6 +133,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = SubResource("Theme_4l4p2")
theme_override_constants/separation = 60
alignment = 1
@ -81,7 +148,7 @@ text = "Coins: "
[node name="HBoxContainer2" type="HBoxContainer" parent="Panel/HBoxContainer4"]
layout_mode = 2
theme_override_constants/separation = 30
theme_override_constants/separation = 5
alignment = 1
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
@ -90,6 +157,10 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Archer"
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
@ -98,6 +169,10 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Wizard"
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer2"]
@ -106,11 +181,15 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Mortar"
[node name="HBoxContainer4" type="HBoxContainer" parent="Panel/HBoxContainer4"]
layout_mode = 2
theme_override_constants/separation = 30
theme_override_constants/separation = 5
alignment = 1
[node name="Button2" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
@ -119,6 +198,10 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Sticks"
[node name="Button3" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
@ -127,6 +210,10 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Mine"
[node name="Button4" type="Button" parent="Panel/HBoxContainer4/HBoxContainer4"]
@ -135,7 +222,12 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
text = "Wall"
theme_override_styles/focus = SubResource("StyleBoxFlat_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_qvqxt")
theme_override_styles/pressed = SubResource("StyleBoxFlat_38m4q")
theme_override_styles/normal = SubResource("StyleBoxFlat_alova")
text = "Wall
"
[node name="HBoxContainer5" type="HBoxContainer" parent="Panel/HBoxContainer4"]
layout_mode = 2
@ -148,7 +240,12 @@ layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
text = "Sell"
theme_override_styles/focus = SubResource("StyleBoxFlat_61fdc")
theme_override_styles/hover = SubResource("StyleBoxFlat_hbwx4")
theme_override_styles/pressed = SubResource("StyleBoxFlat_x181f")
theme_override_styles/normal = SubResource("StyleBoxFlat_5rkja")
text = "Sell
"
[node name="HBoxContainer3" type="HBoxContainer" parent="Panel/HBoxContainer4"]
layout_mode = 2
@ -189,43 +286,43 @@ theme_override_font_sizes/font_size = 64
text = "Game Paused"
horizontal_alignment = 1
[node name="Button" type="Button" parent="pausemenu/VBoxContainer"]
custom_minimum_size = Vector2(250, 60)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 30
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
text = "Main Menu"
[node name="Button2" type="Button" parent="pausemenu/VBoxContainer"]
custom_minimum_size = Vector2(250, 60)
layout_mode = 2
size_flags_horizontal = 4
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 30
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
text = "Restart"
[node name="Button3" type="Button" parent="pausemenu/VBoxContainer"]
custom_minimum_size = Vector2(250, 60)
custom_minimum_size = Vector2(250, 0)
layout_mode = 2
size_flags_horizontal = 4
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 30
theme_override_styles/focus = SubResource("StyleBoxEmpty_qvqxt")
theme_override_styles/focus = SubResource("StyleBoxEmpty_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
text = "Continue"
[connection signal="pressed" from="pausemenu/VBoxContainer/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="pausemenu/VBoxContainer/Button2" to="." method="_on_button_2_pressed"]
[node name="Button2" type="Button" parent="pausemenu/VBoxContainer"]
custom_minimum_size = Vector2(250, 0)
layout_mode = 2
size_flags_horizontal = 4
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 30
theme_override_styles/focus = SubResource("StyleBoxEmpty_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
text = "Restart"
[node name="Button" type="Button" parent="pausemenu/VBoxContainer"]
custom_minimum_size = Vector2(250, 0)
layout_mode = 2
size_flags_horizontal = 4
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_font_sizes/font_size = 30
theme_override_styles/focus = SubResource("StyleBoxEmpty_4l4p2")
theme_override_styles/hover = SubResource("StyleBoxFlat_f5es8")
theme_override_styles/pressed = SubResource("StyleBoxFlat_dgw1d")
theme_override_styles/normal = SubResource("StyleBoxFlat_nctfw")
text = "Exit"
[connection signal="pressed" from="Panel/HBoxContainer4/HBoxContainer4/Button3" to="." method="_on_button_3_pressed"]
[connection signal="pressed" from="pausemenu/VBoxContainer/Button3" to="." method="_on_button_3_pressed"]
[connection signal="pressed" from="pausemenu/VBoxContainer/Button2" to="." method="_on_button_2_pressed"]
[connection signal="pressed" from="pausemenu/VBoxContainer/Button" to="." method="_on_button_pressed"]