示例#1
0
        public static T ShowPopup <T> (string name, IModalMaskType maskType = IModalMaskType.NonMasked, CocoAudioID audioID = CocoAudioID.None)
        {
            CocoAudio.PlaySound(audioID);
            AppModalHandle modalHandle = CocoMainController.Instance.popManager.Add(new AppModalHandle(name, maskType), true) as AppModalHandle;

            return(modalHandle.AppModalView.GetComponentInChildren <T>(true));
        }
        public IModalHandle Show(GeneralDialogData data, bool isOverriding = true, bool isCloseOnOutSideTap = false, bool stacking = false)
        {
            // IModalHandle handle = new AppModalHandle<GeneralDialogData>(prefab,data);
            IModalHandle handle = new AppModalHandle <GeneralDialogData>("GamePopups/GenericDialog", data);

            handle.MaskType = isCloseOnOutSideTap?IModalMaskType.CloseOnOutSideTap : IModalMaskType.Masked;
            return(_modalityManager.Add(handle, isOverriding, stacking));
        }