Fix input being blocked when item is not interactive #91 (#481)
This commit is contained in:
@@ -271,14 +271,8 @@ func _ready():
|
|||||||
# - event: Triggered event
|
# - event: Triggered event
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
if event is InputEventMouseButton and event.is_pressed():
|
if event is InputEventMouseButton and event.is_pressed():
|
||||||
if not escoria.current_state == escoria.GAME_STATE.DEFAULT or \
|
if not escoria.current_state == escoria.GAME_STATE.DEFAULT:
|
||||||
not is_interactive:
|
escoria.logger.info("Game state doesn't accept interactions")
|
||||||
escoria.logger.info(
|
|
||||||
(
|
|
||||||
"Item %s is not interactive or the game state doesn't " +
|
|
||||||
"accept interactions"
|
|
||||||
) % global_id
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
var p = get_global_mouse_position()
|
var p = get_global_mouse_position()
|
||||||
var mouse_in_shape: bool = false
|
var mouse_in_shape: bool = false
|
||||||
|
|||||||
Reference in New Issue
Block a user