Moved last movement-related vars into Movable.gd

This commit is contained in:
Julian Murgia
2021-01-27 17:15:46 +01:00
parent 183439337a
commit 2552e444ed
4 changed files with 71 additions and 113 deletions

View File

@@ -174,7 +174,8 @@ func _process(_delta):
if target and not tween.is_active():
if typeof(target) == TYPE_VECTOR2 or typeof(target) == TYPE_ARRAY:
self.global_position = resolve_target_pos()
elif "moved" in target and target.moved:
elif "moved" in target and target.moved \
or "moved" in target.Movable and target.Movable.moved:
self.global_position = resolve_target_pos()
func _ready():