Advertisement
otorp2

boolean shoot gate

Dec 30th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. var shot_held = false
  2.  
  3.  
  4. func _process(delta):
  5. var SHOOT = Input.is_action_pressed('player_shoot')
  6.  
  7. if SHOOT and not shot_held:
  8. weapon.shoot() # do whatever you do when you shoot
  9.  
  10. shot_held = SHOOT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement