make squig actually center on player
This commit is contained in:
parent
e4db343059
commit
18f1eca8ed
1 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ func _start_falling() -> void:
|
||||||
if not _can_transition:
|
if not _can_transition:
|
||||||
var player = get_tree().get_nodes_in_group("player").pop_back()
|
var player = get_tree().get_nodes_in_group("player").pop_back()
|
||||||
if player != null:
|
if player != null:
|
||||||
global_position.x = player.global_position.x
|
global_position.x = player.global_position.x - 3.0
|
||||||
animation_player.play("falling")
|
animation_player.play("falling")
|
||||||
current_state = State.FALLING
|
current_state = State.FALLING
|
||||||
yield(create_tween().tween_interval(1.0), "finished")
|
yield(create_tween().tween_interval(1.0), "finished")
|
||||||
|
@ -97,7 +97,7 @@ func _start_swimming() -> void:
|
||||||
if not _can_transition:
|
if not _can_transition:
|
||||||
var player = get_tree().get_nodes_in_group("player").pop_back()
|
var player = get_tree().get_nodes_in_group("player").pop_back()
|
||||||
if player != null:
|
if player != null:
|
||||||
global_position.x = player.global_position.x
|
global_position.x = player.global_position.x - 3.0
|
||||||
animation_player.play("swimming")
|
animation_player.play("swimming")
|
||||||
current_state = State.SWIMMING
|
current_state = State.SWIMMING
|
||||||
yield(create_tween().tween_interval(1.0), "finished")
|
yield(create_tween().tween_interval(1.0), "finished")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue