more consistent scene transitions

controller-support
HumanoidSandvichDispenser 2023-08-17 01:14:12 -07:00
parent 0d4605009b
commit 44e9be4124
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
3 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,8 @@ public partial class SceneTransition : Control
public void Exit()
{
_animPlayer.Play("exit");
// call deferred to wait for new map to process
// this avoids a jumpy transition when a new map loads
_animPlayer.CallDeferred("play", "exit");
}
}

View File

@ -10,7 +10,7 @@ shader_parameter/b = 0.0
[sub_resource type="Animation" id="Animation_4e8tt"]
resource_name = "enter"
length = 0.5
length = 0.75
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false

View File

@ -260,8 +260,8 @@ public partial class World : Node
LoadScene(path);
}
EventBus.EmitSignal(EventBus.SignalName.ExitTransition);
GetTree().Paused = false;
EventBus.EmitSignal(EventBus.SignalName.ExitTransition);
// after finished loading, move our player to the connector
MovePlayerToConnector(connector);