Add unlock conditions for gallery

This commit is contained in:
2026-06-08 16:00:27 -07:00
parent 9b2e79dbd2
commit 5665e3306c
11 changed files with 268 additions and 70 deletions
@@ -3,7 +3,6 @@ using Chickensoft.Introspection;
using Godot;
using System.Linq;
using Zennysoft.Ma.Adapter;
using static System.Net.Mime.MediaTypeNames;
namespace Zennysoft.Game.Ma;
@@ -13,21 +12,24 @@ public partial class FinalFloor : SpecialFloor
public override void _Notification(int what) => this.Notify(what);
[Dependency] protected IPlayer _player => this.DependOn(() => GetParent().GetChildren().OfType<IPlayer>().Single());
[Dependency] protected IGame _game => this.DependOn<IGame>();
[Node] public Area3D Exit { get; set; }
public void OnReady()
{
Exit.AreaEntered += Exit_AreaEntered;
Exit.AreaEntered += Exit_AreaEntered;
}
private void Exit_AreaEntered(Area3D area)
private async void Exit_AreaEntered(Area3D area)
{
_player.Die();
await _game.OnReachNormalEnd();
// Start Ending Cutscene
_player.Die();
}
public void OnExitTree()
{
Exit.AreaEntered -= Exit_AreaEntered;
Exit.AreaEntered -= Exit_AreaEntered;
}
}
@@ -28,11 +28,12 @@ public partial class BadEnd : SpecialFloor
tweener.TweenMethod(Callable.From((float x) => SetShakeValue(x)), ShakeAmount, 1f, 700f).SetDelay(30);
}
public void StartEndGameCutscene()
public async void StartEndGameCutscene()
{
_player.Deactivate();
_player.ShowCamera(false);
Camera3D.Current = true;
await _game.OnReachBadEnd();
}
public void EndGame()