Add game manager
This commit is contained in:
@@ -16,13 +16,12 @@ public partial class MainMenu : Node2D
|
||||
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
|
||||
bgmPlayer.SetBGMFromFilepath("Audio/BGM/02 MovinOn.mp3");
|
||||
bgmPlayer.PlayBGM();
|
||||
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
||||
main.LoadLevel(0);
|
||||
}
|
||||
|
||||
private void OnStartButtonPressed()
|
||||
{
|
||||
_player.Play("FirstLevel");
|
||||
var main = GetTree().Root.GetNode<Main>("/root/Main");
|
||||
Hide();
|
||||
_player.AnimationFinished += OnAnimationFinished;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user