using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using Cysharp.Threading.Tasks;

namespace Project.B.Map
{
    /// <summary>
    /// 游戏地图服务
    /// </summary>
    public interface IGameMapService
    {
        /// <summary>
        /// 初始化状态
        /// </summary>
        TaskStatus TaskStatus { get; }
        /// <summary>
        /// 当前已加载或正在加载的地图
        /// </summary>
        string CurrentMap { get; }
        /// <summary>
        /// 获取地图
        /// </summary>
        /// <returns></returns>
        UniTask<string> GetMapAsync();
        /// <summary>
        /// 进入地图
        /// </summary>
        /// <param name="map"></param>
        /// <returns></returns>
        UniTask StartMapAsync(string map);
        /// <summary>
        /// 停止地图,也是返回菜单的意思
        /// </summary>
        /// <returns></returns>
        UniTask StopMapAsync();
        /// <summary>
        /// 当加载状态发生变化时
        /// </summary>
        event Action<TaskStatus,TaskStatus> OnTaskStatusChanged; 
        /// <summary>
        /// 切换场景前
        /// </summary>
        event Func<string, UniTask> OnMapChanging;

        /// <summary>
        /// 切换场景后
        /// </summary>
        event Action<Guid,string> OnMapChanged;
        
        /// <summary>
        /// 地图加载进度
        /// </summary>
        event Action<Guid,float,string> OnMapLoadingProgress; 
    }

}
