using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using WS;

public class ShowMapComponent : OperateComponent<ShowMapData>
{
    /// <summary> 地图弹窗控制器 </summary>
    private MapController mapPop;
    public override void Init()
    {
    }

    public override void StartOperate()
    {
        mapPop = FacadeComponent.Instance.CreateController<MapController>();
        mapPop.OpenView();
        //mapPop.SetView(OperateData.sceneName,() =>
        //{
            
        //    IsComplete = true;
        //});

    }
    public override Task StartState()
    {
        if (mapPop != null)
        {
            mapPop.CloseView();

        }
        return Task.CompletedTask;
    }

    public override Task EndState()
    {
        if (mapPop != null)
        {
            mapPop.CloseView();
        }
        return Task.CompletedTask;
    }
    public override void Update()
    {
    }
}
public class ShowMapData
{
    /// <summary> 场景名称 </summary>
    public string sceneName;
}