Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- var is_mouse_pressed = false
- func _ready():
- set_process(true)
- pass
- func _process(delta):
- update()
- pass
- func _draw():
- if Input.is_mouse_button_pressed(1) && is_mouse_pressed == false:
- print("one shot only")
- is_mouse_pressed = true
- elif !Input.is_mouse_button_pressed(1):
- is_mouse_pressed = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement