private void ProcessHide(CanvasWrapper canvasWrapper)
 {
     canvasWrapper.SetStatus(CanvasStatus.HideAnimationPlaying);
     StartCoroutine(canvasWrapper.OnHideCanvasCoroutine, () =>
     {
         canvasWrapper.SetActive(false);
     });
 }
        public bool IsShow(string canvasName)
        {
            if (System.Enum.TryParse(canvasName, out TCanvasName canvasNameEnum) == false)
            {
                Debug.LogError($"{name} not found canvasInstance:{canvasName}", this);
                return(false);
            }

            CanvasWrapper canvasWrapper = GetCanvasWrapper(canvasNameEnum);

            return(canvasWrapper.isShow);
        }
        public ICanvas Show(TCanvasName canvasName)
        {
            CanvasWrapper canvasWrapper = GetCanvasWrapper(canvasName, canvas => canvas.isShow == false);

            if (canvasWrapper == null)
            {
                canvasWrapper = OnCreateInstance(canvasName);
            }

            if (canvasWrapper != null)
            {
                canvasWrapper.SetActive(true);
                StartCoroutine(canvasWrapper.OnShowCanvasCoroutine());
                OnShowCanvas(canvasName, canvasWrapper.canvasInstance);
            }

            return(canvasWrapper.canvasInstance);
        }
 public Command(TCanvasName canvasName, CanvasWrapper canvasWrapper, bool isShow)
 {
     CanvasName    = canvasName;
     CanvasWrapper = canvasWrapper;
     IsShow        = isShow;
 }
        public bool IsShow(TCanvasName canvasName)
        {
            CanvasWrapper canvasWrapper = GetCanvasWrapper(canvasName);

            return(canvasWrapper.isShow);
        }
        public void Hide(TCanvasName canvasName)
        {
            CanvasWrapper canvasWrapper = GetCanvasWrapper(canvasName);

            ProcessHide(canvasWrapper);
        }