cleans up some code
This commit is contained in:
parent
9217834726
commit
5937b4db69
6
card.gd
6
card.gd
@ -52,7 +52,8 @@ func _physics_process(delta: float) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _gui_input(event: InputEvent) -> void:
|
func _gui_input(event: InputEvent) -> void:
|
||||||
if event is InputEventMouseButton:
|
if event is not InputEventMouseButton:
|
||||||
|
return
|
||||||
match event.button_index:
|
match event.button_index:
|
||||||
MOUSE_BUTTON_LEFT:
|
MOUSE_BUTTON_LEFT:
|
||||||
if event.pressed:
|
if event.pressed:
|
||||||
@ -65,7 +66,8 @@ func _gui_input(event: InputEvent) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _unhandled_key_input(event: InputEvent) -> void:
|
func _unhandled_key_input(event: InputEvent) -> void:
|
||||||
if event.is_action_pressed("default_action"):
|
if not event.is_action_pressed("default_action"):
|
||||||
|
return
|
||||||
if current_pivot == pivot.ROTATE_0:
|
if current_pivot == pivot.ROTATE_0:
|
||||||
current_pivot = pivot.ROTATE_90
|
current_pivot = pivot.ROTATE_90
|
||||||
is_pivot = true
|
is_pivot = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user