fix: Fixes smaller things (#465)

Co-authored-by: Dennis Ploeger <develop@dieploegers.de>
This commit is contained in:
Dennis Ploeger
2021-11-26 08:06:20 +01:00
committed by GitHub
parent 65b3a595f5
commit 8c9ee734fd
5 changed files with 15 additions and 1 deletions

View File

@@ -318,6 +318,8 @@ func update_terrain(on_event_finished_name = null) -> void:
return
if parent.get("dont_apply_terrain_scaling"):
return
if not parent.is_inside_tree():
return
var pos = parent.global_position
if pos.y <= VisualServer.CANVAS_ITEM_Z_MAX:

View File

@@ -471,6 +471,12 @@ func stop_talking():
)
# Replay the last idle animation
func update_idle():
get_animation_player().play(
animations.idles[_movable.last_dir].animation
)
# Return the camera position if a camera_position_node exists or the
# global position of the player

View File

@@ -21,4 +21,5 @@ func _ready():
._ready()
else:
tooltip_name = ""
disconnect("input_event", self, "manage_input")
if is_connected("input_event", self, "manage_input"):
disconnect("input_event", self, "manage_input")

View File

@@ -107,6 +107,7 @@ func _ready():
player.animations = ResourceLoader.load(
animations[player.global_id]
)
player.update_idle()
escoria.object_manager.get_object("_camera").node.set_target(player)
for n in get_children():

View File

@@ -13,6 +13,10 @@ func _ready():
but.toggle_mode = true
func _on_action_selected(action: String):
if escoria.inputs_manager.input_mode != escoria.inputs_manager.INPUT_ALL:
unselect_actions()
return
escoria.action_manager.set_current_action(action)
for but in get_children():