public AssetBundler SetAsUnitTexture(uint unCharaID, Action <AssetBundlerResponse> finishAction = null, Action <string> error = null) { int charaId = (int)unCharaID; string assetBundleName = string.Format("unit_{0}", DivRNUtil.UnitIdToString((uint)charaId)); string assetname = string.Format("Unit_{0}", DivRNUtil.UnitIdToString((uint)charaId)); return(Set(assetBundleName, assetname, typeof(Texture2D), finishAction, error)); }
public void IsUpdateMoveTitle(Action updateAction, Action nextAction) { if (LoadingManager.Instance != null) { LoadingManager.Instance.RequestLoadingStart(LOADING_TYPE.PATCH); } Load( () => { if (LoadingManager.Instance != null) { LoadingManager.Instance.RequestLoadingFinish(LOADING_TYPE.PATCH); } if (LocalSaveManagerRN.Instance.PatcherCounter < GetUpdateCounter()) { #if BUILD_TYPE_DEBUG Debug.Log("Update Counter Change!!! Goto Title!!"); #endif DialogManager.Open1B("ERROR_MSG_UPDATE_TITLE", "ERROR_MSG_UPDATE", "common_button1", true, true). SetDialogEvent(DialogButtonEventType.OK, () => { if (updateAction != null) { updateAction(); } LocalSaveManagerRN.Instance.PatcherCounter = GetUpdateCounter(); LocalSaveManagerRN.Instance.Save(); SceneCommon.Instance.GameToTitle(); }). DisableCancelButton(); } else { if (nextAction != null) { nextAction(); } } }, (error) => { if (LoadingManager.Instance != null) { LoadingManager.Instance.RequestLoadingFinish(LOADING_TYPE.PATCH); } Debug.LogError("ERROR:" + error); DivRNUtil.ShowRetryDialog( () => { IsUpdateMoveTitle(updateAction, nextAction); }); }); }
public AssetBundlerMultiplier Retryable() { DisableAutoDestoryOnFail(); SetOnFail(() => { DivRNUtil.ShowRetryDialog( () => { fsm.SendFsmEvent("RETRY"); }); }); return(this); }
protected override void Awake() { base.Awake(); DisableAutoDestoryOnFail(); failAction = ((str) => { DivRNUtil.ShowRetryDialog( () => { Retry(); }); }); fsm = GetComponent <AssetBundlerFSM>(); }
public void OnClick() { #if BUILD_TYPE_DEBUG Debug.Log("CALL OnClick:" + Title); #endif Dictionary <EMASTERDATA, uint> dict = new Dictionary <EMASTERDATA, uint>(); dict.Add(emasterData, 0); ServerDataUtilSend.SendPacketAPI_GetMasterDataAll2(dict). setSuccessAction( _data => { RecvMasterDataAll2Value result = _data.GetResult <RecvMasterDataAll2>().result; foreach (FieldInfo fi in typeof(RecvMasterDataAll2Value).GetFields()) { object obj = fi.GetValue(result); try { List <int> l = SQLiteClient.Instance.Reflect(obj); if (l.Count >= 2 && l[1] > 0) { #if BUILD_TYPE_DEBUG Debug.Log(string.Format("REFLECT {0} u_or_i:{1}件 d:{2}件 \n", DivRNUtil.GetTableName(obj.GetType().ToString()), l[0], l[1])); #endif } } catch (Exception e) { #if BUILD_TYPE_DEBUG Debug.LogError("ERROR:" + e.Message + "::" + obj.GetType().ToString()); #endif } } }). setErrorAction( _data => { #if BUILD_TYPE_DEBUG Debug.LogError("ERROR"); #endif }). SendStart(); }
//マスタクラス名からテーブル名を導出する public static string GetTableName(this Type t) { return(DivRNUtil.GetTableName(t.Name)); }
// 日付情報から残り時間を所定のフォーマットで返却する public string TimeLeftText(DateTime date) { return(DivRNUtil.DiffTimePresentLabel(date, TimeManager.Instance.m_TimeNow)); }
public void Initialize(bool forceReinitialization) { if (_db == null || forceReinitialization) { initalizeFlags(); //TODOリリース時はパスワードを埋め込む #if BUILD_TYPE_DEBUG dbPassword = "******"; #else dbPassword = "******"; #endif if (changeWorkingName && workingName.Trim() == "") { Debug.LogError("Sqlite3: If you want to change the database's working name, then you will need to supply a new working name in the SimpleSQLManager [" + gameObject.name + "]"); return; } Dispose(); DivRNUtil.ResetTableName(); string documentsPath = getPath(); bool fileExists = (DbFileList().Count > 0) ? true : false; bool proceed = true; if ((overwriteIfExists && fileExists) || !fileExists || (overwriteIfAppVersionUp && PlayerPrefs.GetInt(SOLITE_APPVERSION_KEY, 0) < GlobalDefine.AppVerToInt())) { try { if (fileExists) { RemoveDbFiles(); } CopyDbFile(documentsPath); PlayerPrefs.SetInt(SOLITE_APPVERSION_KEY, GlobalDefine.AppVerToInt()); PlayerPrefs.Save(); if (databaseCreated != null) { databaseCreated(documentsPath); } } catch { proceed = false; Debug.LogError("Sqlite3: Failed to open database at the working path: " + documentsPath); } } if (proceed) { CreateConnection(documentsPath); _db.Trace = debugTrace; } } }
void OnQuitApplication() { DivRNUtil.ShowQuitApplicationDialog(); }
static public string GetCharaIconSpriteName(uint unCharaID) { return(unCharaID > 0 ? string.Format("chara_icon_{0}", DivRNUtil.UnitIdToStringMin(unCharaID)) : "chara_icon_empty"); }
void Start() { gameObject.name += "::" + Achievement.fix_id.ToString() + "::" + Achievement.server_state; if (!Achievement.IsState_Appear) { Debug.LogError("Why i am here?"); return; } stateProgressGO.SetActive(false); stateAchieveGO.SetActive(false); stateRewardedGO.SetActive(false); #if BUILD_TYPE_DEBUG //Debug.Log("MissionListItem:" + gameObject.name + ":" + Achievement.AchievementState); #endif //解説 desc.text = Achievement.Desc; // アイテム名 itemName.text = Achievement.PresentName; //プレゼントアイコン Achievement.GetPresentIcon(sprite => { icon.sprite = sprite; }); //プレゼント数 count.text = Achievement.PresentCount.ToString(); limitParentGO.SetActive(false); // リストを押せるかどうか if (Achievement.achievement_category_id == (uint)ACHIEVEMENT_CATEGORY_TYPE.QUEST) { ItemButton.interactable = true; } else { ItemButton.interactable = false; } //状態:報酬獲得済み if (Achievement.IsState_Rewarded) { stateRewardedGO.SetActive(true); return; } //状態:条件達成済み if (Achievement.IsState_Achieve || Achievement.IsState_AchieveEffect) { stateAchieveGO.SetActive(true); //期限 if (Achievement.HasExpira) { limitParentGO.SetActive(true); limit.text = DivRNUtil.DiffTimePresentLabel(Achievement.ExpiraDate, TimeManager.Instance.m_TimeNow) + "\n"; } return; } //以降、状態:出現 stateProgressGO.SetActive(true); //期限 if (Achievement.HasExpira) { limitParentGO.SetActive(true); limit.text = DivRNUtil.DiffTimeMissonLabel(Achievement.ExpiraDate, TimeManager.Instance.m_TimeNow) + "\n"; } //現在の進行度 hasProgressCountGO.SetActive(false); hasNotProgressCountGO.SetActive(false); if (Achievement.TotalCount > 0) { hasProgressCountGO.SetActive(true); progressFill.fillAmount = Achievement.ProgressRate; //progressText.text = string.Format("{0}/{1}", Achievement.ProgressCount, Achievement.TotalCount); progressText.text = string.Format("{0}", Achievement.ProgressCount); progressMaxText.text = string.Format("{0}", Achievement.TotalCount); } else { hasNotProgressCountGO.SetActive(true); } }
public static string GetTableName(this EMASTERDATA emasterdata) { return(DivRNUtil.GetTableName(emasterdata.ToString().Replace("eMASTERDATA_", ""))); }