Smoke effect and animations revamp
This commit is contained in:
parent
d752dd17dc
commit
4c3e35d1fc
20 changed files with 106 additions and 29 deletions
|
|
@ -23,7 +23,7 @@ func _exit() -> void:
|
|||
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
||||
|
||||
func on_animation_finished(animation):
|
||||
if animation == with_morphems("shoot"):
|
||||
if animation == machine.animation_prefix + with_morphems("shoot"):
|
||||
transition.emit("Idle")
|
||||
|
||||
func _use_begin() -> void:
|
||||
|
|
@ -37,8 +37,7 @@ func fire() -> void:
|
|||
machine.ammo -= 1
|
||||
bullets_shot += 1
|
||||
|
||||
machine.animation_player.stop()
|
||||
machine.animation_player.play(with_morphems("shoot"))
|
||||
machine.play(with_morphems("shoot"))
|
||||
|
||||
if is_multiplayer_authority():
|
||||
Session.shoot(int(machine.player.name),limb_damage,torso_damage,head_damage,shoot_distance,damage_reduction_curve)
|
||||
|
|
@ -48,4 +47,4 @@ func fire() -> void:
|
|||
machine.player_camera.recoil(horizontal_curve.sample(bullets_shot),vertical_curve.sample(bullets_shot))
|
||||
|
||||
func with_morphems(animation):
|
||||
return machine.animation_prefix + ((animation+"_empty") if emptyable and machine.ammo == 0 else animation)
|
||||
return ((animation+"_empty") if emptyable and machine.ammo == 0 else animation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue