Beispiel #1
0
        /// <summary>
        /// 弹窗
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="callBack">需要回调的对象</param>
        public void AlertWindow(AlertWindowType type, IWindowListener callBack = null)
        {
            if (callBack != null)
            {
                RegisterSender(callBack);
            }
            GameObject tempGo = default(GameObject);

            switch (type)
            {
            case AlertWindowType.SelectWindow:
                tempGo = TSingleTon <PrefabLoad> .Singleton().LoadFromResource("Common", SelectLevelWindow.PrefabName);

                break;
            }
            if (tempGo != null)
            {
                currentWindow = GameObject.Instantiate(tempGo, windowRoot);
                currentWindow.transform.localPosition = Vector3.zero;
                currentAlert = currentWindow.GetComponent <SelectLevelWindow>();
            }
        }
        /// <summary>
        /// 覆写父类的取消方法
        /// </summary>
        public override void OnCancle()
        {
            TSingleTon <AlertWindowManager> .Singleton().WindowCancle();

            base.OnCancle();
        }
        /// <summary>
        /// 覆写父类的提交方法
        /// </summary>
        public override void OnSubmit()
        {
            TSingleTon <AlertWindowManager> .Singleton().WindowCallBack(levelNum.text);

            base.OnSubmit();
        }