Unsafe shootage
This commit is contained in:
parent
cc26793ab6
commit
a046ae5288
8 changed files with 27 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ extends Usable
|
|||
|
||||
@export var prefix: String
|
||||
|
||||
@export var raycast: RayCast3D
|
||||
|
||||
var ammo_amount: int
|
||||
var fire_timer: Timer
|
||||
|
||||
|
|
@ -43,6 +45,10 @@ func fire() -> void:
|
|||
system.animation_player.stop()
|
||||
system.animation_player.play(prefix+"_shoot")
|
||||
system.animation_player.queue(prefix+"_idle")
|
||||
|
||||
if raycast.is_colliding():
|
||||
raycast.get_collider().hp -= damage
|
||||
|
||||
|
||||
func alternate_state() -> void:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue