Scene transitions initial implementation
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user