protected override void OnOpen(object userData) { base.OnOpen(userData); DialogParams dialogParams = (DialogParams)userData; if (dialogParams == null) { Log.Warning("DialogParams is invalid."); return; } dialogMode = dialogParams.Mode; RefreshDialogMode(); titleText.text = dialogParams.Title; messageText.text = dialogParams.Message; pauseGame = dialogParams.PauseGame; RefreshPauseGame(); userData = dialogParams.UserData; RefreshConfirmText(dialogParams.ConfirmText); onClickConfirm = dialogParams.OnClickConfirm; RefreshCancelText(dialogParams.CancelText); onClickCancel = dialogParams.OnClickCancel; RefreshOtherText(dialogParams.OtherText); onClickOther = dialogParams.OnClickOther; }
public void Check(Dictionary <string, string> headers, GameFrameworkAction <IEnumerable <AssetBundleInfo> > checkAssetBundleInfoCompleteHandle = null, GameFrameworkFunc <string> getAppUpdateUrl = null, GameFrameworkAction <string> errorHandle = null, GameFrameworkAction <string> stateUpdateHandle = null) { _isInitCheck = false; _completeHandle = checkAssetBundleInfoCompleteHandle; _errorHandle = errorHandle; _stateUpdateHandle = stateUpdateHandle; _getAppUpdateUrl = getAppUpdateUrl; _stateUpdate("资源版本,检查开始!"); StartCoroutine(_check(headers)); }
protected override void OnClose(object userData) { if (pauseGame) { GameEntry.Base.ResumeGame(); } dialogMode = DialogParams.DialogMode.单按钮; titleText.text = string.Empty; messageText.text = string.Empty; pauseGame = false; userData = null; RefreshConfirmText(string.Empty); onClickConfirm = null; RefreshCancelText(string.Empty); onClickCancel = null; RefreshOtherText(string.Empty); onClickOther = null; base.OnClose(userData); }
public static TResult Handle <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult>(this GameFrameworkFunc <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, TResult> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13) { return(action == null ? default(TResult) : action.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13)); }
public static TResult Handle <T1, T2, T3, T4, T5, T6, T7, TResult>( this GameFrameworkFunc <T1, T2, T3, T4, T5, T6, T7, TResult> action, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7) { return(action == null ? default(TResult) : action.Invoke(arg1, arg2, arg3, arg4, arg5, arg6, arg7)); }
public static TResult Handle <T1, T2, T3, TResult>( this GameFrameworkFunc <T1, T2, T3, TResult> action, T1 arg1, T2 arg2, T3 arg3) { return(action == null ? default(TResult) : action.Invoke(arg1, arg2, arg3)); }
public static TResult Handle <TResult>(this GameFrameworkFunc <TResult> action) { return(action == null ? default(TResult) : action.Invoke()); }
/// <summary> /// 严格模式下将会计算本地资源包md5和远程版本文件对比, /// 否则只会对比本地版本文件里记录的md5 /// </summary> /// <param name="completeHandle">检查完成,参数:更新列表</param> /// <param name="getAppUpdateUrl">获取App更新地址,如果返回了将会打开网页,否则不会有反应</param> /// <param name="errorHandle">检查失败,参数:失败信息</param> /// <param name="stateUpdateHandle">检查状态,参数:当前状态</param> public void Check(GameFrameworkAction <IEnumerable <AssetBundleInfo> > completeHandle = null, GameFrameworkFunc <string> getAppUpdateUrl = null, GameFrameworkAction <string> errorHandle = null, GameFrameworkAction <string> stateUpdateHandle = null) { Check(null, completeHandle, getAppUpdateUrl, errorHandle, stateUpdateHandle); }