added pipe rifle animation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class_name DamageParticle
|
||||
extends Sprite3D
|
||||
|
||||
@onready var label: Label = $SubViewport/Label
|
||||
@export var label: Label
|
||||
var time_alive: float = 0.0
|
||||
var movement_speed: float = 1.0
|
||||
var movement_vector: Vector3
|
||||
@@ -13,6 +13,7 @@ func _ready() -> void:
|
||||
var phi: float = randf_range(0, 2 * PI)
|
||||
var vector: Vector3 = Vector3(sqrt(1 - pow(z, 2)) * cos(phi), z, sqrt(1 - pow(z, 2)) * sin(phi))
|
||||
movement_vector = vector.normalized()
|
||||
visible = true
|
||||
|
||||
|
||||
func set_number(num: int) -> void:
|
||||
|
||||
@@ -2,23 +2,26 @@
|
||||
|
||||
[ext_resource type="Script" uid="uid://blt7umrgo3tfh" path="res://UI/DamageParticle/damage_particle.gd" id="1_lgvaq"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ppqlh"]
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_fiibr"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="Node3D" type="Sprite3D" unique_id=1014123125]
|
||||
[node name="Node3D" type="Sprite3D" unique_id=1014123125 node_paths=PackedStringArray("label")]
|
||||
visible = false
|
||||
pixel_size = 0.005
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
alpha_cut = 1
|
||||
texture_filter = 2
|
||||
render_priority = 1
|
||||
texture = SubResource("ViewportTexture_ppqlh")
|
||||
texture = SubResource("ViewportTexture_fiibr")
|
||||
script = ExtResource("1_lgvaq")
|
||||
label = NodePath("SubViewport/Label")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="." unique_id=1770696222]
|
||||
transparent_bg = true
|
||||
size = Vector2i(172, 57)
|
||||
render_target_update_mode = 4
|
||||
size = Vector2i(37, 21)
|
||||
render_target_update_mode = 1
|
||||
|
||||
[node name="Label" type="Label" parent="SubViewport" unique_id=1905792669]
|
||||
anchors_preset = 15
|
||||
|
||||
@@ -138,6 +138,7 @@ text = "BUTTON_MAIN_MENU"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1265670542]
|
||||
stream = SubResource("AudioStreamRandomizer_dram5")
|
||||
volume_db = -10.599
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="VBoxContainer/Buttons/ContinueButton" to="." method="_on_button_mouse_entered"]
|
||||
|
||||
@@ -37,6 +37,11 @@ func _ready() -> void:
|
||||
# spawn.spawn_wave()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
return_to_main_menu()
|
||||
|
||||
|
||||
#these exist purely to make the enemies that spawn on the main menu happy
|
||||
func enemy_died(_some_arg: Enemy) -> void:
|
||||
pass
|
||||
@@ -105,7 +110,13 @@ func open_game_menu() -> void:
|
||||
func _on_back_button_pressed() -> void:
|
||||
main_controls.visible = true
|
||||
game_select_menu.visible = false
|
||||
|
||||
|
||||
|
||||
func return_to_main_menu() -> void:
|
||||
main_controls.visible = true
|
||||
game_select_menu.visible = false
|
||||
profile_controls.visible = false
|
||||
mods_controls.visible = false
|
||||
|
||||
|
||||
func generate_seed() -> void:
|
||||
|
||||
@@ -100,6 +100,7 @@ text = "BUTTON_QUIT"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=422058960]
|
||||
stream = SubResource("AudioStreamRandomizer_2jyua")
|
||||
volume_db = -10.599
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="GameSelectMenu" type="PanelContainer" parent="." unique_id=1604474538]
|
||||
|
||||
@@ -86,12 +86,19 @@ func select_card(option: int) -> void:
|
||||
tower_feature_uis = []
|
||||
for feature_ui: FeatureUI in weapon_feature_uis:
|
||||
feature_ui.queue_free()
|
||||
for price_panel: PricePanel in tower_prices:
|
||||
price_panel.visible = true
|
||||
for price_panel: PricePanel in weapon_prices:
|
||||
price_panel.visible = true
|
||||
cost = 0
|
||||
price_label.text = tr(PRICE_STR) + str(cost)
|
||||
confirm_button.disabled = false
|
||||
weapon_feature_uis = []
|
||||
card_selected = cards[option]
|
||||
temp_card = card_selected.duplicate()
|
||||
temp_card.tower_stats = temp_card.tower_stats.get_duplicate()
|
||||
temp_card.weapon_stats = temp_card.weapon_stats.get_duplicate()
|
||||
card_desc.set_card(temp_card, check_button_pressed)
|
||||
press_check_button(check_button_pressed)
|
||||
for feature: Feature in temp_card.tower_stats.features:
|
||||
add_feature(feature, 0, false)
|
||||
for feature: Feature in temp_card.weapon_stats.features:
|
||||
|
||||
@@ -52,15 +52,15 @@ func _on_mouse_sens_h_slider_value_changed(value: float) -> void:
|
||||
|
||||
|
||||
func _on_option_button_item_selected(index: int) -> void:
|
||||
print(index)
|
||||
#print(index)
|
||||
if index == 0:
|
||||
get_tree().root.size = Vector2i(320, 240)
|
||||
#DisplayServer.window_set_size(Vector2i(320, 240))
|
||||
print(get_tree().root.size)
|
||||
#print(get_tree().root.size)
|
||||
if index == 1:
|
||||
get_tree().root.size = Vector2i(1920, 1080)
|
||||
#DisplayServer.window_set_size(Vector2i(1920, 1080))
|
||||
print(get_tree().root.size)
|
||||
#print(get_tree().root.size)
|
||||
|
||||
|
||||
func _on_spin_box_value_changed(value: float) -> void:
|
||||
|
||||
@@ -10,6 +10,8 @@ extends VBoxContainer
|
||||
@export var vertex_jitter_slider: HSlider
|
||||
@export var affine_warping_input: SpinBox
|
||||
@export var affine_warping_slider: HSlider
|
||||
@export var resolution_scaling_input: SpinBox
|
||||
@export var resolution_scaling_slider: HSlider
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -22,6 +24,8 @@ func _ready() -> void:
|
||||
vertex_jitter_slider.value = Data.graphics.vertex_jitter
|
||||
affine_warping_input.value = Data.graphics.affine_warping
|
||||
affine_warping_slider.value = Data.graphics.affine_warping
|
||||
resolution_scaling_slider.value = Data.graphics.resolution_scaling
|
||||
resolution_scaling_input.value = Data.graphics.resolution_scaling
|
||||
|
||||
|
||||
func save() -> void:
|
||||
@@ -31,6 +35,7 @@ func save() -> void:
|
||||
Data.graphics.windowed_mode = window_dropdown.selected
|
||||
Data.graphics.vertex_jitter = vertex_jitter_slider.value
|
||||
Data.graphics.affine_warping = affine_warping_slider.value
|
||||
Data.graphics.resolution_scaling = resolution_scaling_slider.value
|
||||
|
||||
|
||||
func _on_fov_spin_box_value_changed(value: float) -> void:
|
||||
@@ -73,3 +78,17 @@ func _on_affine_warping_spin_box_value_changed(value: float) -> void:
|
||||
func _on_affine_warping_h_slider_value_changed(value: float) -> void:
|
||||
affine_warping_input.value = value
|
||||
Data.graphics.affine_warping = value
|
||||
|
||||
|
||||
func _on_resolution_scaling_spin_box_value_changed(value: float) -> void:
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
resolution_scaling_slider.value = value
|
||||
Data.resolution_changed.emit(Vector2(1920, 1080) * value)
|
||||
|
||||
|
||||
func _on_resolution_scaling_h_slider_value_changed(value: float) -> void:
|
||||
resolution_scaling_input.value = value
|
||||
Data.resolution_changed.emit(Vector2(1920, 1080) * value)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
|
||||
|
||||
[node name="Graphics" type="VBoxContainer" unique_id=1842224615 node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown", "vertex_jitter_input", "vertex_jitter_slider", "affine_warping_input", "affine_warping_slider")]
|
||||
[node name="Graphics" type="VBoxContainer" unique_id=1842224615 node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown", "vertex_jitter_input", "vertex_jitter_slider", "affine_warping_input", "affine_warping_slider", "resolution_scaling_input", "resolution_scaling_slider")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@@ -20,6 +20,43 @@ vertex_jitter_input = NodePath("VextexJitter/HBoxContainer/SpinBox")
|
||||
vertex_jitter_slider = NodePath("VextexJitter/HBoxContainer/HSlider")
|
||||
affine_warping_input = NodePath("AffineWarping/HBoxContainer/SpinBox")
|
||||
affine_warping_slider = NodePath("AffineWarping/HBoxContainer/HSlider")
|
||||
resolution_scaling_input = NodePath("ResolutionScaling/HBoxContainer/SpinBox")
|
||||
resolution_scaling_slider = NodePath("ResolutionScaling/HBoxContainer/HSlider")
|
||||
|
||||
[node name="ResolutionScaling" type="HBoxContainer" parent="." unique_id=1230619872]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Label" type="Label" parent="ResolutionScaling" unique_id=550655132]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "OPTION_RESOLUTION_SCALING"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ResolutionScaling" unique_id=1042104415]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="SpinBox" type="SpinBox" parent="ResolutionScaling/HBoxContainer" unique_id=3787654]
|
||||
layout_mode = 2
|
||||
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
allow_greater = true
|
||||
allow_lesser = true
|
||||
alignment = 1
|
||||
update_on_text_changed = true
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="ResolutionScaling/HBoxContainer" unique_id=608837003]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 1
|
||||
max_value = 1.0
|
||||
step = 0.01
|
||||
value = 0.2
|
||||
scrollable = false
|
||||
|
||||
[node name="FOV" type="HBoxContainer" parent="." unique_id=693078328]
|
||||
layout_mode = 2
|
||||
@@ -194,6 +231,8 @@ step = 0.01
|
||||
value = 1.0
|
||||
scrollable = false
|
||||
|
||||
[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/SpinBox" to="." method="_on_resolution_scaling_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="ResolutionScaling/HBoxContainer/HSlider" to="." method="_on_resolution_scaling_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="FOV/HBoxContainer/SpinBox" to="." method="_on_fov_spin_box_value_changed"]
|
||||
[connection signal="value_changed" from="FOV/HBoxContainer/HSlider" to="." method="_on_fov_h_slider_value_changed"]
|
||||
[connection signal="value_changed" from="VextexJitter/HBoxContainer/SpinBox" to="." method="_on_vertex_jitter_spin_box_value_changed"]
|
||||
|
||||
@@ -20,6 +20,11 @@ func set_tab_locale() -> void:
|
||||
audio.name = tr("OPTIONS_TAB_AUDIO")
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("Pause"):
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_cancel_pressed() -> void:
|
||||
queue_free()
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ text = "BUTTON_CONFIRM"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=103920719]
|
||||
stream = SubResource("AudioStreamRandomizer_5otwj")
|
||||
volume_db = -9.937
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_button_hovered"]
|
||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"]
|
||||
|
||||
@@ -61,6 +61,7 @@ text = "BUTTON_QUIT"
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="." unique_id=1218417780]
|
||||
stream = SubResource("AudioStreamRandomizer_n6ixr")
|
||||
volume_db = -11.261
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="mouse_entered" from="PanelContainer/VBoxContainer/Resume" to="." method="_on_button_mouse_entered"]
|
||||
|
||||
Reference in New Issue
Block a user