i forgor; i think it's audio mixing?
This commit is contained in:
parent
e57db65b33
commit
c54ccb4d4f
12 changed files with 51 additions and 15 deletions
|
|
@ -58,7 +58,9 @@ func _init() -> void:
|
|||
func _ready() -> void:
|
||||
health = health
|
||||
|
||||
await get_tree().process_frame
|
||||
if not Level.level:
|
||||
await get_tree().process_frame
|
||||
|
||||
Level.level.level_started.connect(func(): %EngineSFX.play())
|
||||
|
||||
func _process_stamina(delta: float) -> void:
|
||||
|
|
@ -179,7 +181,7 @@ func _process(delta: float) -> void:
|
|||
else:
|
||||
%Tank.rotation.y = opp_dir.angle()
|
||||
|
||||
func damage(damager: Node3D) -> void:
|
||||
func damage(damager: Node3D, amount: int = 1) -> void:
|
||||
if health <= 0: return
|
||||
if state == State.DASHING:
|
||||
if damager.has_method("kill"):
|
||||
|
|
@ -187,7 +189,7 @@ func damage(damager: Node3D) -> void:
|
|||
else:
|
||||
if damage_clock <= 0.:
|
||||
%CrashSFX.play()
|
||||
health -= 1
|
||||
health -= amount
|
||||
damage_clock = 3
|
||||
shake_duration = .25
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue