Scene transitions initial implementation

This commit is contained in:
2023-09-11 00:07:40 -07:00
parent 81a56986ac
commit 51307c0d40
48 changed files with 1755 additions and 130 deletions

View File

@@ -7,6 +7,9 @@ public partial class MainMenu : Node2D
[Signal]
public delegate void IntroAnimationsCompletedEventHandler();
private PlayerInput _player1Input;
private PlayerInput _player2Input;
public override void _Ready()
{
GetParent().GetNode<TextureRect>("MainMenu/UIAnimations/LoreSplash").Show();
@@ -15,6 +18,16 @@ public partial class MainMenu : Node2D
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
bgmPlayer.SetBGMFromFilepath("Audio/BGM/TitleTheme.ogg");
bgmPlayer.PlayBGM();
_player1Input = new Player1Input();
_player2Input = new Player2Input();
}
public override void _UnhandledInput(InputEvent @event)
{
if (Input.IsActionJustPressed(_player1Input.Fire()) || Input.IsActionJustPressed(_player2Input.Fire()))
{
_animationPlayer.Seek(10);
}
}