using UnityEngine;

namespace pdinklag.CPW.Common
{
    /// <summary>
    /// Provides access to arena features.
    /// </summary>
    public interface IArena
    {
        /// <summary>
        /// Gets the main ring in the arena.
        /// </summary>
        IRing Ring { get; }

        /// <summary>
        /// Gets the position of the given entrance waypoint.
        /// </summary>
        /// <param name="which">the waypoint in question</param>
        /// <returns>the position of the selected waypoint</returns>
        Vector3 GetWaypointPos(EntranceWaypoint.Enum which);

        /// <summary>
        /// Gets the facing direction of the given entrance waypoint.
        /// </summary>
        /// <param name="which">the waypoint in question</param>
        /// <returns>the facing direction of the selected waypoint</returns>
        Vector3 GetWaypointDir(EntranceWaypoint.Enum which);

        /// <summary>
        /// Gets the given camera spot.
        /// </summary>
        /// <param name="which">the camera spot in question</param>
        /// <returns>the selected camera spot</returns>
        Vector3 GetCameraSpot(CameraSpot.Enum which);

        /// <summary>
        /// Gets the spotlights according to the given selection.
        /// </summary>
        /// <param name="sel">the spotlight selection</param>
        /// <returns>the selected spotlights</returns>
        ISpotlightGroup GetSpotlights(SpotlightSelection sel);

        /// <summary>
        /// Resets all lights to their default colors.
        /// </summary>
        /// <param name="ctx">the execution context</param>
        /// <param name="duration">the fade duration</param>
        /// <returns>the corresponding yield instruction</returns>
        YieldInstructionCode ResetLights(IContext ctx, float duration);

        /// <summary>
        /// Access to the ambient light.
        /// </summary>
        ILight AmbientLight { get; }

        /// <summary>
        /// Access to the main arena light.
        /// </summary>
        ILight MainLight { get; }

        /// <summary>
        /// Access to the stage lights.
        /// </summary>
        ILightGroup StageLights { get; }

        /// <summary>
        /// Access to the ring lights.
        /// </summary>
        ILightGroup RingLights { get; }

        /// <summary>
        /// Access to the camera light.
        /// </summary>
        ILight CameraLight { get; }

        /// <summary>
        /// Access to the fog "light".
        /// </summary>
        ILight Fog { get; }
    }
}
