Godot Version
4.3
Question
Adding an Area2D named EndLevel that I’m going to use to finish the level.
Current code:
public override void _Ready()
{
BodyEntered += CheckBody;
}
private void CheckBody(Node2D something)
{
if ( !(something is PlayerCharacter) )
{
return;
}
EndCurrentLevel();
}
I have yet to define EndCurrentLevel()
, simply because I want two things to happen when the Player reaches the end:
-
The next level be loaded asynchronously and ChangeSceneToPacked into.
-
Game logic to stop. I don’t want it so that the player can get hit even though they’ve reached the end.
Problems:
-
How do I pause the game such that EndLevel and ResourceLoader still function?
-
I want to use
_Process()
to do the whole ResourceLoader.LoadThreadedGetStatus() thing so that I don’t have to use timers or some other way. Can I trust SetProcess(false) to not mess the functionality up?
Note: I’m aware of GetTree().Paused’s existence, but I’m unsure about what it affects, hence why I’m asking.