using System;
using ftt.Core.Managing.LevelLoading;

namespace ftt.Core.Managing.GameEvents
{
    /// <summary>
    /// A class containing all game-wide events.
    /// </summary>
    public class GameEventsHandler
    {
        /// <summary>
        /// Add to this event to get notified when a a Focused Scene gets changed.
        /// (Through the SceneLoader)
        /// </summary>
        public event Action<GameScenes> onSceneChanged;
        /// <summary>
        /// Call to notify the onSceneChanged callbacks.
        /// </summary>
        /// <param name="focusedScene">The currently focused scene.</param>
        public void OnSceneChanged(GameScenes focusedScene)
        {
            if (onSceneChanged != null)
            {
                onSceneChanged(focusedScene);
            }
        }
    }
}
