Browse Source

2d platformer gun cooldown fix (#686)

Restart cooldown timer when gun has fired
cubeface 3 năm trước cách đây
mục cha
commit
b46a823342
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      2d/platformer/src/Actors/Gun.gd

+ 1 - 0
2d/platformer/src/Actors/Gun.gd

@@ -22,4 +22,5 @@ func shoot(direction = 1):
 	bullet.set_as_toplevel(true)
 	bullet.set_as_toplevel(true)
 	add_child(bullet)
 	add_child(bullet)
 	sound_shoot.play()
 	sound_shoot.play()
+	timer.start()
 	return true
 	return true