Basic ending
This commit is contained in:
15
Levels/Scenes/GameEnding.cs
Normal file
15
Levels/Scenes/GameEnding.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
|
||||
public partial class GameEnding : Node3D
|
||||
{
|
||||
public void OnGameEnding()
|
||||
{
|
||||
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
|
||||
bgmPlayer.ProcessMode = ProcessModeEnum.Always;
|
||||
bgmPlayer.SetBGMFromFilepath("Audio/BGM/GameEnding.ogg");
|
||||
bgmPlayer.PlayBGM();
|
||||
|
||||
var animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
|
||||
animationPlayer.Play("GameEnding");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user