progress
This commit is contained in:
13
Scene.gd
13
Scene.gd
@@ -125,6 +125,17 @@ func start_main_script(s):
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventMouseButton and event.is_action("interact"):
|
||||
print (ego.position, pathfind.to_local(get_global_mouse_position()))
|
||||
var path = NavigationServer2D.map_get_path(map, ego.position, pathfind.to_local(get_global_mouse_position()), true)
|
||||
|
||||
# If look cursor is active and we got here, no SetPiece handled the input
|
||||
# so this is a room-wide look
|
||||
if ActionState.current_action == ActionState.Action.LOOK:
|
||||
_on_room_looked()
|
||||
return
|
||||
|
||||
var path = NavigationServer2D.map_get_path(map, ego.position, pathfind.to_local(get_global_mouse_position()), true)
|
||||
start_main_script(ScriptBuilder.init(ScriptBuilder.walk_path(ego, path)).can_interrupt().build(self, "_on_script_complete"))
|
||||
pass
|
||||
|
||||
func _on_room_looked() -> void:
|
||||
# Default room look description - override in room scripts
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user