public override void OnActivate(int pinID) { if (this.m_Api != null) { DebugUtility.LogError("同時に複数の通信が入ると駄目!"); } else { if (pinID == 100) { MultiInvitationReceiveWindow instance = MultiInvitationReceiveWindow.instance; if (instance != null) { int page = 1; if (instance.GetLogPage() != page) { this.m_Api = (FlowNode_ReqMultiInvitationHistory.ApiBase) new FlowNode_ReqMultiInvitationHistory.Api_MultiInvitationHistory(this, page); } else { this.m_Api = (FlowNode_ReqMultiInvitationHistory.ApiBase) new FlowNode_ReqMultiInvitationHistory.Api_MultiInvitationHistory(this, page); this.m_Api.Success(); this.m_Api = (FlowNode_ReqMultiInvitationHistory.ApiBase)null; } } } if (this.m_Api == null) { return; } this.m_Api.Start(); ((Behaviour)this).set_enabled(true); } }
public void Deserialize(FriendPresentWishList.Json[] jsons) { if (jsons == null) { throw new InvalidJSONException(); } this.Clear(); for (int index = 0; index < jsons.Length; ++index) { FriendPresentWishList.Json json = jsons[index]; if (json != null) { if (json.priority > 0 && json.priority <= this.m_Array.Length) { FriendPresentItemParam presentItemParam = MonoSingleton <GameManager> .Instance.MasterParam.GetFriendPresentItemParam(json.iname); if (presentItemParam != null) { this.m_Array[json.priority - 1] = presentItemParam; } } else { DebugUtility.LogError(string.Format("ウィッシュリスト優先の範囲は 1 ~ {0} まで > {1}", (object)this.m_Array.Length, (object)json.priority)); } } } }
public static string GetPartnerIname(string unit_iname, string skill_iname) { if (string.IsNullOrEmpty(unit_iname) || string.IsNullOrEmpty(skill_iname)) { return((string)null); } GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (Object.op_Equality((Object)instanceDirect, (Object)null)) { return((string)null); } CollaboSkillParam collaboSkillParam = instanceDirect.MasterParam.CollaboSkills.Find((Predicate <CollaboSkillParam>)(fcs => fcs.UnitIname == unit_iname)); if (collaboSkillParam == null) { DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname CollaboSkillParam not found. unit_iname={0}", (object)unit_iname)); return((string)null); } CollaboSkillParam.LearnSkill learnSkill = collaboSkillParam.mLearnSkillLists.Find((Predicate <CollaboSkillParam.LearnSkill>)(fls => fls.SkillIname == skill_iname)); if (learnSkill != null) { return(learnSkill.PartnerUnitIname); } DebugUtility.LogError(string.Format("CollaboSkillParam/GetPartnerIname LearnSkill not found. skill_iname={0}", (object)skill_iname)); return((string)null); }
public override void OnActivate(int pinID) { if (pinID != 0) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; QuestParam selectedQuest = this.SelectedQuest; if (selectedQuest == null) { DebugUtility.LogError("QuestNotFound \"" + GlobalVars.SelectedQuestID + "\" "); } else { int num = selectedQuest.RequiredApWithPlayerLv(instance.Player.Lv, true); if (GlobalVars.RaidNum > 0) { num *= GlobalVars.RaidNum; } if (num <= instance.Player.Stamina) { this.ActivateOutputLinks(100); } else { UIUtility.ConfirmBox(string.Format(LocalizedText.Get("sys.CONFIRM_POINT"), (object)this.RestoreCost), new UIUtility.DialogResultEvent(this.OnRestoreStamina), new UIUtility.DialogResultEvent(this.OnCancel), (GameObject)null, false, -1, (string)null, (string)null); } } }
private void CreateHighlightObject() { if (!Object.op_Equality((Object)FlowNode_HighlightObject.highlight, (Object)null)) { return; } GameObject gameObject1 = AssetManager.Load <GameObject>("SGDevelopment/Tutorial/Tutorial_Guidance"); if (Object.op_Equality((Object)gameObject1, (Object)null)) { DebugUtility.LogError("Failed to load"); } else { GameObject gameObject2 = (GameObject)Object.Instantiate <GameObject>((M0)gameObject1); RectTransform component1 = (RectTransform)gameObject1.GetComponent <RectTransform>(); if (Object.op_Inequality((Object)component1, (Object)null) && Object.op_Inequality((Object)gameObject1.GetComponent <Canvas>(), (Object)null)) { RectTransform component2 = (RectTransform)gameObject2.GetComponent <RectTransform>(); component2.set_anchorMax(component1.get_anchorMax()); component2.set_anchorMin(component1.get_anchorMin()); component2.set_anchoredPosition(component1.get_anchoredPosition()); component2.set_sizeDelta(component1.get_sizeDelta()); } FlowNode_HighlightObject.highlight = (SGHighlightObject)gameObject2.GetComponent <SGHighlightObject>(); DebugUtility.LogWarning("highlight:" + (object)FlowNode_HighlightObject.highlight); } }
public void Setup(TobiraData tobiraData) { if (tobiraData == null) { DebugUtility.LogError("tobiraDataがnullの時はSetup(TobiraParam param)を使用してください"); } else { this.m_Category = tobiraData.Param.TobiraCategory; this.m_TextTobiraName.set_text(TobiraParam.GetCategoryName(this.m_Category)); this.m_IconTobira.ImageIndex = (int)this.m_Category; if (tobiraData.IsLearnedLeaderSkill) { TobiraLearnSkill listItem = this.CreateListItem(); SkillData skill = new SkillData(); skill.Setup(tobiraData.LearnedLeaderSkillIname, 1, 1, (MasterParam)null); listItem.Setup(skill); } List <AbilityData> newAbilitys = new List <AbilityData>(); List <AbilityData> oldAbilitys = new List <AbilityData>(); TobiraUtility.TryCraeteAbilityData(tobiraData.Param, tobiraData.Lv, newAbilitys, oldAbilitys, false); for (int index = 0; index < newAbilitys.Count; ++index) { this.CreateListItem().Setup(newAbilitys[index]); } BaseStatus add = new BaseStatus(); BaseStatus scale = new BaseStatus(); TobiraUtility.CalcTobiraParameter(tobiraData.Param.UnitIname, this.m_Category, tobiraData.Lv, ref add, ref scale); this.m_StatusList.SetValues(add, scale, false); GameUtility.SetGameObjectActive(this.m_ObjectDetail, true); GameUtility.SetGameObjectActive(this.m_ObjectLock, false); GameUtility.SetGameObjectActive(this.m_ObjectCommingSoon, false); } }
public ArtifactData CreateArtifactData() { if (!this.CheckGiftTypeIncluded(GiftTypes.Artifact)) { DebugUtility.LogError("このギフトは武具ではありません"); return((ArtifactData)null); } ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(this.iname); if (artifactParam == null) { return((ArtifactData)null); } ArtifactData artifactData = new ArtifactData(); artifactData.Deserialize(new Json_Artifact() { iid = 1L, exp = 0, iname = artifactParam.iname, fav = 0, rare = !this.IsValidRarity ? artifactParam.rareini : this.rarity }); return(artifactData); }
public static void PushAward(TrophyParam trophy) { if (trophy == null || !Object.op_Inequality((Object)NotifyList.mInstance, (Object)null) || !Object.op_Inequality((Object)NotifyList.mInstance.Item_Award, (Object)null)) { return; } for (int index = 0; index < trophy.Items.Length; ++index) { AwardParam awardParam = MonoSingleton <GameManager> .Instance.GetAwardParam(trophy.Items[index].iname); if (awardParam != null) { NotifyListItem notifyListItem = (NotifyListItem)Object.Instantiate <NotifyListItem>((M0)NotifyList.mInstance.Item_Award); notifyListItem.Message.set_text(LocalizedText.Get("sys.AWARD_GET", new object[1] { (object)awardParam.name })); NotifyList.mInstance.Push(notifyListItem); } else { DebugUtility.LogError("Not found trophy award. iname is [ " + trophy.Items[index].iname + " ]"); } } }
public void Refresh(UnitData[] units) { if (this.m_SupportUnits == null) { DebugUtility.LogError("m_SupportUnitsがnullです。"); } else if (units == null) { DebugUtility.LogError("unitsがnullです。"); } else if (this.m_SupportUnits.Length < Enum.GetValues(typeof(EElement)).Length) { DebugUtility.LogError("m_SupportUnitsの数が足りません。Inspectorからの設定を確認してください。"); } else if (units.Length < this.m_SupportUnits.Length) { DebugUtility.LogError("unitsの数が足りません。"); } else { for (int element = 0; element < units.Length; ++element) { this.Refresh(element, units[element]); } GameParameter.UpdateAll(((Component)this).get_gameObject()); } }
public override void OnActivate(int pinID) { if (pinID != 0) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; QuestParam selectedQuest = this.SelectedQuest; if (selectedQuest == null) { DebugUtility.LogError("QuestNotFound \"" + GlobalVars.SelectedQuestID + "\" "); } else { int num = selectedQuest.RequiredApWithPlayerLv(instance.Player.Lv, true); if (GlobalVars.RaidNum > 0) { num *= GlobalVars.RaidNum; } if (num <= instance.Player.Stamina) { this.ActivateOutputLinks(100); } else { this.ActivateOutputLinks(103); } } }
private void OnSelect(Button button) { if (Object.op_Equality((Object)button, (Object)null)) { DebugUtility.LogError("Buttonが存在しません"); } else { PlayBackUnitVoiceItem componentInChildren = (PlayBackUnitVoiceItem)((Component)button).get_gameObject().GetComponentInChildren <PlayBackUnitVoiceItem>(); if (Object.op_Equality((Object)componentInChildren, (Object)null)) { DebugUtility.LogError("PlayBackUnitVoiceItemが存在しません"); } else if (componentInChildren.IsLocked) { this.mScrollRect.StopMovement(); this.ShowUnlockConditionsTooltip(componentInChildren); } else { if (Object.op_Inequality((Object)this.mLastSelectItem, (Object)null) && this.mLastSelectItem.CueName != componentInChildren.CueName) { this.mLastSelectItem.SetPlayingBadge(false); } componentInChildren.SetPlayingBadge(true); this.mLastSelectItem = componentInChildren; this.PlayVoice(componentInChildren.CueName); } } }
public override void OnActivate(int pinID) { if (this.m_Api != null) { DebugUtility.LogError("同時に複数の通信が入ると駄目!"); } else { switch (pinID) { case 0: this.m_Api = (FlowNode_ReqSupportList.ApiBase) new FlowNode_ReqSupportList.Api_SupportList(this, this.m_Window.rootWindow.GetElement(), false); break; case 10: this.m_Api = (FlowNode_ReqSupportList.ApiBase) new FlowNode_ReqSupportList.Api_SupportList(this, this.m_Window.rootWindow.GetElement(), true); break; } if (this.m_Api == null) { return; } this.m_Api.Start(); ((Behaviour)this).set_enabled(true); } }
public override void OnActivate(int pinID) { if (this.m_Api != null) { DebugUtility.LogError("同時に複数の通信が入ると駄目!"); } else { switch (pinID) { case 100: this.m_Api = (FlowNode_ReqWishList.ApiBase) new FlowNode_ReqWishList.Api_WishList(this); break; case 200: FriendPresentRootWindow.WantContent.ItemAccessor clickItem1 = FriendPresentRootWindow.WantContent.clickItem; FriendPresentWantWindow.Content.ItemAccessor clickItem2 = FriendPresentWantWindow.Content.clickItem; if (clickItem1 != null && clickItem2 != null) { this.m_Api = (FlowNode_ReqWishList.ApiBase) new FlowNode_ReqWishList.Api_WishListSet(this, clickItem2.presentId, clickItem1.priority); break; } break; } if (this.m_Api == null) { return; } this.m_Api.Start(); ((Behaviour)this).set_enabled(true); } }
protected virtual void RefreshItems() { this.mPageSize = this.CellCount; Transform listParent = (Transform)this.ListParent; while (this.mItems.Count < this.mPageSize) { GameObject gameObject = this.CreateItem(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { DebugUtility.LogError("CreateItem returned NULL"); return; } gameObject.get_transform().SetParent(listParent, false); this.mItems.Add(gameObject); ListItemEvents component = (ListItemEvents)gameObject.GetComponent <ListItemEvents>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.OnSelect = new ListItemEvents.ListItemEvent(this._OnItemSelect); } } if (this.mItems.Count == 0) { return; } if (this.mPageSize > 0) { this.mMaxPages = (this.DataCount + this.ExtraItems.Length + this.mPageSize - 1) / this.mPageSize; this.mPage = Mathf.Clamp(this.mPage, 0, this.mMaxPages - 1); } if (this.mFocusSelection) { this.mFocusSelection = false; if (this.mSelection != null && this.mSelection.Count > 0) { int num = Array.IndexOf <object>(this.mData, this.mSelection[0]) + this.ExtraItems.Length; if (num >= 0) { this.mPage = num / this.mPageSize; } } } this.BindData(); for (int index = 0; index < this.ExtraItems.Length; ++index) { int num = this.mPage * this.mPageSize + index; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ExtraItems[index], (UnityEngine.Object)null)) { this.ExtraItems[index].SetActive(0 <= num && num < this.ExtraItems.Length); } } this.UpdateSelection(); this.UpdatePage(); if (!this.mInvokeSelChange) { return; } this.mInvokeSelChange = false; this.TriggerSelectionChange(); }
public override Table GetTableByName(string name, ParameterSet param) { int snapshotIndex; if (param != null && param.TryGetValue("snapshotindex", out snapshotIndex)) { Schema schema; switch (snapshotIndex) { case 0: schema = m_SchemaBefore; break; case 1: schema = m_SchemaAfter; break; default: DebugUtility.LogError("Requesting a table from an invalid snapshot index. Must be 0 or 1. Is " + snapshotIndex); return(null); } return(schema.GetTableByName(name, param)); } return(GetTableByName(name)); }
public void Refresh(long[] uniqs) { if (this.m_SupportUnits == null) { DebugUtility.LogError("m_SupportUnitsがnullです。"); } else if (uniqs == null) { DebugUtility.LogError("unitsがnullです。"); } else if (this.m_SupportUnits.Length < Enum.GetValues(typeof(EElement)).Length) { DebugUtility.LogError("m_SupportUnitsの数が足りません。Inspectorからの設定を確認してください。"); } else if (uniqs.Length < this.m_SupportUnits.Length) { DebugUtility.LogError("unitsの数が足りません。"); } else { for (int element = 0; element < uniqs.Length; ++element) { this.Refresh(element, MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID(uniqs[element])); } GameParameter.UpdateAll(((Component)this).get_gameObject()); } }
protected BridgeResponse SyncInvokePlatform(CallPlatformMethod invokeMethod, params JsonData[] args) { var request = BridgeRequest.Create(invokeMethod.ToString(), args); var requestJson = request.ToJson(); BridgeResponse response = null; try { var result = InvokePlatform(requestJson); response = BridgeResponse.Deserialize(result); if (response == null) { DebugUtility.LogError(LoggerTags.Module, "同步调用 -> arg:{0}; 解析错误 -> result:{1}", requestJson, result); response = BridgeResponse.CreateErrorResponse(request.id, BridgeCode.ReturnTypeError); return(response); } else { DebugUtility.Log(LoggerTags.Module, "同步调用 -> arg:{0}; 返回 -> result:{1}", requestJson, result); return(response); } } catch (Exception ex) { DebugUtility.LogError(LoggerTags.Module, "同步调用 -> arg:{0}; 异常 -> Exception:{1}", requestJson, ex); response = BridgeResponse.CreateErrorResponse(request.id, BridgeCode.InvokeParamError); return(response); } }
public override void OnActivate(int pinID) { if (this.m_Api != null) { DebugUtility.LogError("同時に複数の通信が入ると駄目!"); } else { switch (pinID) { case 100: this.m_Api = (FlowNode_ReqUnitFavorite.ApiBase) new FlowNode_ReqUnitFavorite.Api_SetUnitFavorite(this, true); break; case 110: this.m_Api = (FlowNode_ReqUnitFavorite.ApiBase) new FlowNode_ReqUnitFavorite.Api_SetUnitFavorite(this, false); break; } if (this.m_Api == null) { return; } this.m_Api.Start(); ((Behaviour)this).set_enabled(true); } }
public override ICommandResponseAsync Execute(ICommand command) { IProtocol result = null; switch (command.commandID) { case ECommand.MotorCommand: { result = ExecuteMotorCommands(command); break; } } if (result == null) { DebugUtility.LogError(LoggerTags.Project, "Failure to execute command : {0}", command); } else { DebugUtility.Log(LoggerTags.Project, "Success to execute command : {0}", command); } var cra = new CommandResponseAsync(result); cra.host = command.host; cra.context = command.context; return(cra); }
// Token: 0x0600376A RID: 14186 RVA: 0x000F8D34 File Offset: 0x000F6F34 public void SetBahvior(int id) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetBahviorInt32_hotfix != null) { this.m_SetBahviorInt32_hotfix.call(new object[] { this, id }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (id < 1) { return; } ConfigDataGroupBehavior configDataGroupBehavior = this.m_team.Battle.ConfigDataLoader.GetConfigDataGroupBehavior(id); if (configDataGroupBehavior == null) { if (this.m_team.Battle.IsEnableDebugLog()) { DebugUtility.LogError(string.Format("Failed to find battle {0} 's group behavior {1}.", this.m_team.Battle.BattleInfo.ID, id)); } return; } this.m_curBehaviorCfg = configDataGroupBehavior; }
private void createDisplaySellItem(List <ItemData> list) { List <SellItem> sellItemList = new List <SellItem>(); using (List <ItemData> .Enumerator enumerator = list.GetEnumerator()) { while (enumerator.MoveNext()) { ItemData current = enumerator.Current; GameObject gameObject = this.CreateItem(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { DebugUtility.LogError("CreateItem returned NULL"); return; } gameObject.get_transform().SetParent((Transform)this.ListParent, false); ListItemEvents component = (ListItemEvents)gameObject.GetComponent <ListItemEvents>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelect); } if (current.ItemType != EItemType.Other) { this.mSellItemGameObjects.Add(gameObject); SellItem orSearchSellItem = this.CreateOrSearchSellItem(current); sellItemList.Add(orSearchSellItem); DataSource.Bind <SellItem>(gameObject, orSearchSellItem); } } } this.mSellItemList = sellItemList; }
public static void PasteHierarchy() { var systemCopyBuffer = GUIUtility.systemCopyBuffer; if (string.IsNullOrEmpty(systemCopyBuffer)) { return; } if (!systemCopyBuffer.Contains("hierarchy")) { DebugUtility.LogError(LoggerTags.Project, "It's not the engine format."); return; } var root = LitJson.JsonMapper.ToObject(systemCopyBuffer); if (root.ContainsKey("hierarchy")) { var hierarchy = root["hierarchy"]; if (hierarchy.IsArray) { int hierarchyCount = hierarchy.Count; GameObject robot = new GameObject(Guid.NewGuid().ToString()); Transform robotRoot = robot.transform; for (int i = 0; i < hierarchyCount; ++i) { GameObject go = new GameObject(i.ToString()); go.transform.SetParent(robotRoot, true); SimpleDeserialize(go.transform, hierarchy[i]); } UnityEditor.Selection.activeTransform = robotRoot; } } }
public bool Deserialize(JSON_VersusEnableTimeScheduleParam json) { this.mBegin = json.begin_time; this.mOpen = json.open_time; this.mQuestIname = json.quest_iname; try { if (json.add_date != null) { this.mAddDateList = new List <DateTime>(); for (int index = 0; index < json.add_date.Length; ++index) { if (!string.IsNullOrEmpty(json.add_date[index])) { this.mAddDateList.Add(DateTime.Parse(json.add_date[index])); } } } } catch (Exception ex) { DebugUtility.LogError(ex.Message); return(false); } return(true); }
public void SetSortMethod(string method, bool ascending, string[] filters) { GameUtility.UnitSortModes unitSortModes = GameUtility.UnitSortModes.Time; try { if (!string.IsNullOrEmpty(method)) { unitSortModes = (GameUtility.UnitSortModes)Enum.Parse(typeof(GameUtility.UnitSortModes), method, true); } } catch (Exception ex) { if (GameUtility.IsDebugBuild) { DebugUtility.LogError("Unknown sort mode: " + method); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AscendingIcon, (UnityEngine.Object)null)) { this.AscendingIcon.SetActive(ascending); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.DescendingIcon, (UnityEngine.Object)null)) { this.DescendingIcon.SetActive(!ascending); } if (unitSortModes == GameUtility.UnitSortModes.Time) { ascending = !ascending; } this.RefreshData(); }
public override void OnSuccess(WWWResult www) { if (Network.IsError) { Network.EErrCode errCode = Network.ErrCode; this.OnRetry(); } else { WebAPI.JSON_BodyResponse <Json_ArtifactSelectResponse> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_ArtifactSelectResponse> >(www.text); DebugUtility.Assert(jsonObject != null, "res == null"); if (jsonObject.body == null) { this.OnRetry(); } else { Network.RemoveAPI(); for (int index = 0; index < jsonObject.body.select.Length; ++index) { Json_ArtifactSelectItem artifactSelectItem = jsonObject.body.select[index]; if (artifactSelectItem.num > (short)1) { DebugUtility.LogError("武具は一つしか付与できません " + artifactSelectItem.iname); } } this.Deserialize(jsonObject.body); this.Success(); } } }
private void OnLoadAreaDetailInfoCompleted(string pathOrAddress, UnityObject obj, SystemObject userData) { if (obj == null) { DebugUtility.LogError(Constants.LOG_TAG, "AreaDetailInfo is null"); } m_IsInitialized = true; if (m_IsReleasing) { if (m_AreaRoot != null) { UnityObject.DestroyImmediate(m_AreaRoot.gameObject); m_AreaRoot = null; } return; } TextAsset text = obj as TextAsset; m_AreaDetailInfo = new AreaDetailInfo(); byte[] areaBytes = text.bytes; m_AreaDetailInfo.Deserialize(areaBytes); InitAreaLayer(); ///一初始化完 就得去刷新地图 DoCheckPlayerPos(true); #if UNITY_EDITOR DebugAreaLayer debugLayer = m_AreaRoot.GetOrAddComponent <DebugAreaLayer>(); debugLayer.m_AreaLayerInfos = m_AreaDetailInfo.AreaLayerInfos; debugLayer.m_AreaDetailInfo = m_AreaDetailInfo; #endif }
private void RefreshSubPanel(int index = -1) { this.ClearPanel(); if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.MainPanelCloseBtn, (UnityEngine.Object)null)) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():MainPanelCloseBtn is Null References!"); } else { ((Component)this.MainPanelCloseBtn).get_gameObject().SetActive(false); if (index < 0) { DebugUtility.LogWarning("UnitEvolutionWindow.cs => RefreshSubPanel():index is 0!"); } else { RecipeParam currentRecipe = this.GetCurrentRecipe(this.mCurrentUnit); if (currentRecipe == null) { DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():recipeParam is Null References!"); } else { ItemParam itemParam = MonoSingleton <GameManager> .GetInstanceDirect().GetItemParam(currentRecipe.items[index].iname); if (itemParam == null) { DebugUtility.LogError("UnitEvolutionWindow.cs => RefreshSubPanel():itemParam is Null References!"); } else { this.SubPanel.SetActive(true); DataSource.Bind <ItemParam>(this.SubPanel, itemParam); GameParameter.UpdateAll(this.SubPanel.get_gameObject()); if (this.mLastSelectItemIname != itemParam.iname) { this.ResetScrollPosition(); this.mLastSelectItemIname = itemParam.iname; } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)QuestDropParam.Instance, (UnityEngine.Object)null)) { return; } QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests; List <QuestParam> itemDropQuestList = QuestDropParam.Instance.GetItemDropQuestList(itemParam, GlobalVars.GetDropTableGeneratedDateTime()); using (List <QuestParam> .Enumerator enumerator = itemDropQuestList.GetEnumerator()) { while (enumerator.MoveNext()) { QuestParam qp = enumerator.Current; DebugUtility.Log("QuestList:" + qp.iname); bool isActive = Array.Find <QuestParam>(availableQuests, (Predicate <QuestParam>)(p => p.iname == qp.iname)) != null; this.AddList(qp, isActive); } } } } } } }
public void call(string args) { var request = BridgeRequest.Deserialize(args); if (request == null) { DebugUtility.LogError(LoggerTags.Module, "平台调用 -> 异常args:{0}", args); return; } DebugUtility.Log(LoggerTags.Module, "平台调用 -> 传入args:{0}", args); var response = BridgeResponse.CreateDefaultResponse(request.id, request.callbackMethod); var invokeMethod = request.invokeMethod.ToEnum(CallUnityMethod.Unknown); var method = caller.PullListener(invokeMethod); if (method != null) { try { method(request, response); } catch (Exception ex) { DebugUtility.LogException(ex); response.SetFailureResult(BridgeCode.Failure); caller.DefaultCallBackPlatform(response); } } else { DebugUtility.LogError(LoggerTags.Module, "平台调用 -> 方法未监听!method:{0}, id:{1}", request.invokeMethod, request.id); response.SetFailureResult(BridgeCode.NorFunc); caller.DefaultCallBackPlatform(response); } }
public static List <RankingQuestParam> FindRankingQuestParamBySchedule(RankingQuestScheduleParam.RakingQuestScheduleGetFlags flag) { List <RankingQuestParam> rankingQuestParamList = new List <RankingQuestParam>(); GameManager instanceDirect = MonoSingleton <GameManager> .GetInstanceDirect(); if (UnityEngine.Object.op_Equality((UnityEngine.Object)instanceDirect, (UnityEngine.Object)null)) { return(rankingQuestParamList); } if (instanceDirect.RankingQuestParams == null) { DebugUtility.LogError("GameManager.Instance.RankingQuestParamsがnullです"); return(rankingQuestParamList); } List <RankingQuestScheduleParam> questScheduleParam = RankingQuestScheduleParam.GetRankingQuestScheduleParam(flag); List <RankingQuestParam> rankingQuestParams = instanceDirect.RankingQuestParams; for (int index1 = 0; index1 < rankingQuestParams.Count; ++index1) { for (int index2 = 0; index2 < questScheduleParam.Count; ++index2) { if (rankingQuestParams[index1].schedule_id == questScheduleParam[index2].id) { rankingQuestParamList.Add(rankingQuestParams[index1]); break; } } } return(rankingQuestParamList); }
public void SetShopItemDesc(Json_ShopItemDesc item) { this.ItemIcon.SetActive(false); this.ArtifactIcon.SetActive(false); this.ConceptCard.SetActive(false); if (item.IsItem) { this.ItemIcon.SetActive(true); } else if (item.IsArtifact) { this.ArtifactIcon.SetActive(true); } else if (item.IsConceptCard) { this.ConceptCard.SetActive(true); } else { DebugUtility.LogError(string.Format("不明な商品タイプが設定されています (item.iname({0}) => {1})", (object)item.iname, (object)item.itype)); } if (this.mShopItem == null) { this.mShopItem = new EventShopItem(); } this.mShopItem.num = item.num; this.mShopItem.iname = item.iname; }