Added turret projectile

This commit is contained in:
2026-06-30 22:16:44 +03:00
parent f5e09daf66
commit fdece3a3dc
15 changed files with 335 additions and 8 deletions
+17 -3
View File
@@ -5,11 +5,25 @@ extends Node
const NORMAL_TIME_SCALE = 1.0
@export var hitstop_duration := 0.1
@export var short_hitstop_duration := 0.05
@export var medium_hitstop_duration := 0.1
@export var long_hitstop_duration := 0.15
@export var hitstop_time_scale := 0.0
func hitstop() -> void:
func short_hitstop() -> void:
_hitstop(short_hitstop_duration)
func medium_hitstop() -> void:
_hitstop(medium_hitstop_duration)
func long_hitstop() -> void:
_hitstop(long_hitstop_duration)
func _hitstop(duration: float) -> void:
Engine.time_scale = hitstop_time_scale
await get_tree().create_timer(hitstop_duration, true, true, true).timeout
await get_tree().create_timer(duration, true, true, true).timeout
Engine.time_scale = NORMAL_TIME_SCALE
+1
View File
@@ -32,6 +32,7 @@ const MUSIC_BUS = "Music"
@export var sfx_stream_jump : AudioStream
@export var sfx_stream_land : AudioStream
@export var sfx_stream_swing : AudioStream
@export var sfx_stream_turret_hit : AudioStream
@export var sfx_stream_turret_shot : AudioStream
@export var sfx_stream_wall_jump : AudioStream
+2
View File
@@ -14,6 +14,7 @@
[ext_resource type="AudioStream" uid="uid://bj6ausg5hyuyg" path="res://sound/sfx/swing.wav" id="7_ab171"]
[ext_resource type="AudioStream" uid="uid://33unutlwsika" path="res://sound/sfx/wall_jump.wav" id="8_22ptj"]
[ext_resource type="AudioStream" uid="uid://bnrvkm5wy8wda" path="res://sound/sfx/turret_shot.wav" id="13_814q3"]
[ext_resource type="AudioStream" uid="uid://8nag1oaly0by" path="res://sound/sfx/turret_hit.wav" id="13_ounmg"]
[node name="SoundManager" type="Node" unique_id=1576371552]
process_mode = 3
@@ -35,5 +36,6 @@ sfx_stream_game_over = ExtResource("6_6ll5c")
sfx_stream_jump = ExtResource("5_fpnh3")
sfx_stream_land = ExtResource("6_22ptj")
sfx_stream_swing = ExtResource("7_ab171")
sfx_stream_turret_hit = ExtResource("13_ounmg")
sfx_stream_turret_shot = ExtResource("13_814q3")
sfx_stream_wall_jump = ExtResource("8_22ptj")