Skip to content

Commit

Permalink
feat: ✨ Add CurrentScene Property
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Klein committed May 10, 2023
1 parent 0338499 commit 933e95e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Visuals/SceneManagementService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.ObjectModel;
using Microsoft.Extensions.Logging;

// TODO: Current Scene Property
// TODO: OnSceneChanged Event
// TODO: OnSceneChanging Event - Scene Change blocker?

Expand All @@ -17,6 +16,8 @@ public class SceneManagementService<TSceneEnum>
#endregion

#region Properties
public TSceneEnum CurrentScene { get; set; }

public ReadOnlyDictionary<TSceneEnum, string> RegisteredSceneFiles {
get {
return new ReadOnlyDictionary<TSceneEnum, string>(this._registeredScenes);
Expand Down Expand Up @@ -69,6 +70,8 @@ public void LoadScene(TSceneEnum sceneKey) {
var appHostNode = this._appHostNodeProvider.GetNode();
appHostNode.GetTree().ChangeSceneToFile(fileName);

this.CurrentScene = sceneKey;

this._logger.LogInformation("Done Loading Scene '{0}'",
Enum.GetName(typeof(TSceneEnum), sceneKey),
fileName);
Expand Down

0 comments on commit 933e95e

Please sign in to comment.