internal void UpdateUI() { UnitData dataOfClass = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); if (dataOfClass == null) { return; } GameParameter.UpdateAll(((Component)this).get_gameObject()); JobData jobData = dataOfClass.GetJobData(0); this.mRenkeiText.set_text(dataOfClass.GetCombination().ToString()); if (jobData != null) { this.mMoveText.set_text(jobData.Param.mov.ToString()); this.mJumpText.set_text(jobData.Param.jmp.ToString()); } this.RefreshAbilitList(); this.RefreshLeaderSkillInfo(); this.ReloadPreviewModels(); if (jobData != null) { for (int index = 0; index < this.mPreviewControllers.Count; ++index) { if (this.mPreviewControllers[index].UnitData != null) { this.mCurrentPreview.DefaultLayer = this.mPreviewControllers[index].UnitData.JobIndex != 0 ? GameUtility.LayerHidden : GameUtility.LayerCH1; } } } this.FadeUnitImage(0.0f, 0.0f, 0.0f); this.StartCoroutine(this.RefreshUnitImage()); }
private void OnEnemySelect(GameObject go) { ArenaPlayer dataOfClass = DataSource.FindDataOfClass <ArenaPlayer>(go, (ArenaPlayer)null); if (dataOfClass == null || !AssetDownloader.isDone) { return; } PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player.ChallengeArenaNum <= 0) { UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.ARENA_DAYLIMIT"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1); } else if (player.GetNextChallengeArenaCoolDownSec() > 0L) { this.OnCooldownButtonClick(); } else { GlobalVars.SelectedArenaPlayer.Set(dataOfClass); if (Object.op_Inequality((Object)this.VsEnemyPartyInfo, (Object)null)) { DataSource.Bind <ArenaPlayer>(this.VsEnemyPartyInfo, dataOfClass); GameParameter.UpdateAll(this.VsEnemyPartyInfo); } FlowNode_GameObject.ActivateOutputLinks((Component)this, 101); this.BattlePreWindow.SetActive(true); } }
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) { MyPhoton pt = PunMonoSingleton <MyPhoton> .Instance; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)pt, (UnityEngine.Object)null)) { string roomParam = pt.GetRoomParam("started"); if (roomParam != null) { JSON_MyPhotonPlayerParam[] players = JSONParser.parseJSONObject <FlowNode_StartMultiPlay.PlayerList>(roomParam).players; if (players.Length > 0) { JSON_MyPhotonPlayerParam photonPlayerParam = this.Type != FlowNode_BindMultiUnit.TargetType.Player ? Array.Find <JSON_MyPhotonPlayerParam>(players, (Predicate <JSON_MyPhotonPlayerParam>)(p => p.playerID != pt.GetMyPlayer().playerID)) : Array.Find <JSON_MyPhotonPlayerParam>(players, (Predicate <JSON_MyPhotonPlayerParam>)(p => p.playerID == pt.GetMyPlayer().playerID)); if (photonPlayerParam != null) { PartyData partyOfType = MonoSingleton <GameManager> .Instance.Player.FindPartyOfType(PlayerPartyTypes.RankMatch); for (int index = 0; index < this.Targets.Length && index < photonPlayerParam.units.Length && (GlobalVars.SelectedMultiPlayRoomType != JSON_MyPhotonRoomParam.EType.RANKMATCH || partyOfType == null || index < partyOfType.VSWAITMEMBER_START); ++index) { photonPlayerParam.units[index].unit = new UnitData(); photonPlayerParam.units[index].unit.Deserialize(photonPlayerParam.units[index].unitJson); DataSource.Bind <UnitData>(this.Targets[index], photonPlayerParam.units[index].unit); GameParameter.UpdateAll(this.Targets[index]); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Image, (UnityEngine.Object)null) && index == 0) { DataSource.Bind <UnitData>(this.Image, photonPlayerParam.units[index].unit); GameParameter.UpdateAll(this.Image); } } } } } } this.ActivateOutputLinks(2); }
private void State_Setup() { GameObject gameObject = GameObjectID.FindGameObject("UI_TREASURE"); if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { Debug.LogError((object)"UI_TREASUREが見つかりませんでした。"); } else { this.m_TargetRect = gameObject.get_transform() as RectTransform; } DataSource.Bind <ItemParam>(((Component)this).get_gameObject(), this.m_DropItem.param); if ((bool)this.m_DropItem.is_secret) { ItemIcon component = (ItemIcon)((Component)this).get_gameObject().GetComponent <ItemIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.IsSecret = true; } } GameParameter.UpdateAll(((Component)this).get_gameObject()); this.m_ItemIcon = (ItemIcon)((Component)this).get_gameObject().GetComponent <ItemIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ItemIcon, (UnityEngine.Object)null)) { this.m_ItemIcon.Num.set_text(this.m_DropItem.num.ToString()); } ((Component)this).get_transform().set_localScale(new Vector3(0.3f, 0.3f, 1f)); ((Component)this).get_transform().set_position(new Vector3((float)((Component)this).get_transform().get_position().x, (float)(((Component)this).get_transform().get_position().y + 25.0), (float)((Component)this).get_transform().get_position().z)); this.m_EndAnimator = (Animator)gameObject.GetComponent <Animator>(); this.m_State = DropItemEffect.State.OPEN; }
public void Refresh() { int num = this.mCurrentItemData.Num; this.mMaxNum = num <= 10 ? num : 10; this.mSaveUseNum = 1; this.gacham.UseTicketNum = this.mSaveUseNum; if (Object.op_Inequality((Object)this.WindowTitle, (Object)null)) { this.WindowTitle.set_text(LocalizedText.Get("sys.GACHA_TICKET_SELECT_TITLE", new object[1] { (object)this.mCurrentItemData.Param.name })); } if (Object.op_Inequality((Object)this.AmountTicket, (Object)null)) { DataSource.Bind <ItemData>(this.AmountTicket, this.CurrentItemData); } if (Object.op_Inequality((Object)this.TicketNumSlider, (Object)null)) { ((UnityEventBase)this.TicketNumSlider.get_onValueChanged()).RemoveAllListeners(); this.TicketNumSlider.set_minValue(1f); this.TicketNumSlider.set_maxValue((float)this.mMaxNum); // ISSUE: method pointer ((UnityEvent <float>) this.TicketNumSlider.get_onValueChanged()).AddListener(new UnityAction <float>((object)this, __methodptr(OnUseNumChanged))); this.TicketNumSlider.set_value((float)this.mSaveUseNum); } this.UsedNum.text = this.mSaveUseNum.ToString(); GameParameter.UpdateAll(this.AmountTicket); }
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()); } }
private void OnEquipClick(SRPG_Button button) { if (!((Selectable)button).IsInteractable()) { return; } if (this.OnEquip != null) { this.OnEquip(); } else { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID); if (unitDataByUniqueId == null) { return; } int selectedEquipmentSlot = (int)GlobalVars.SelectedEquipmentSlot; if (!MonoSingleton <GameManager> .Instance.Player.SetUnitEquipment(unitDataByUniqueId, selectedEquipmentSlot)) { return; } GameParameter.UpdateAll(((Component)this).get_gameObject()); int selectedJobIndex = this.GetSelectedJobIndex(unitDataByUniqueId); ItemData itemDataByItemParam = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemParam(unitDataByUniqueId.GetRankupEquipData(selectedJobIndex, selectedEquipmentSlot).ItemParam); GlobalVars.SelectedEquipUniqueID.Set(itemDataByItemParam.UniqueID); FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); } }
private void RefreshDefenseParty() { PlayerData player = MonoSingleton <GameManager> .Instance.Player; PartyData partyOfType = player.FindPartyOfType(PlayerPartyTypes.ArenaDef); for (int index = 0; index < this.PartyUnitSlots.Length; ++index) { long unitUniqueId = partyOfType.GetUnitUniqueID(index); UnitData unitData1 = player.FindUnitDataByUniqueID(unitUniqueId); if (unitData1 != null && unitData1.GetJobFor(PlayerPartyTypes.ArenaDef) != unitData1.CurrentJob) { UnitData unitData2 = new UnitData(); unitData2.TempFlags |= UnitData.TemporaryFlags.TemporaryUnitData; unitData2.Setup(unitData1); unitData2.SetJob(PlayerPartyTypes.ArenaDef); unitData1 = unitData2; } if (index == 0) { DataSource.Bind <UnitData>(this.DefenseUnitLeader, unitData1); GameParameter.UpdateAll(this.DefenseUnitLeader); } DataSource.Bind <UnitData>(this.DefenseUnitSlots[index], unitData1); GameParameter.UpdateAll(this.DefenseUnitSlots[index]); } if (!Object.op_Inequality((Object)this.DefensePartyInfo, (Object)null)) { return; } DataSource.Bind <PartyData>(this.DefensePartyInfo, partyOfType); GameParameter.UpdateAll(this.DefensePartyInfo); }
private void Start() { JobParam data1 = (JobParam)null; JobParam data2 = (JobParam)null; if (string.IsNullOrEmpty(this.PrevJobID) && string.IsNullOrEmpty(this.NextJobID)) { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID); if (unitDataByUniqueId == null) { return; } JobData jobData = (JobData)null; for (int index = 0; index < unitDataByUniqueId.Jobs.Length; ++index) { if (unitDataByUniqueId.Jobs[index] != null && unitDataByUniqueId.Jobs[index].UniqueID == (long)GlobalVars.SelectedJobUniqueID) { jobData = unitDataByUniqueId.Jobs[index]; } } if (jobData == null) { return; } JobData baseJob = unitDataByUniqueId.GetBaseJob(jobData.JobID); if (baseJob != null) { data1 = baseJob.Param; } data2 = jobData.Param; } if (!string.IsNullOrEmpty(this.PrevJobID)) { data1 = MonoSingleton <GameManager> .Instance.MasterParam.GetJobParam(this.PrevJobID); } if (!string.IsNullOrEmpty(this.NextJobID)) { data2 = MonoSingleton <GameManager> .Instance.MasterParam.GetJobParam(this.NextJobID); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NextJob, (UnityEngine.Object)null)) { DataSource.Bind <JobParam>(this.NextJob, data2); GameParameter.UpdateAll(this.NextJob); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.PrevJob, (UnityEngine.Object)null)) { DataSource.Bind <JobParam>(this.PrevJob, data1); GameParameter.UpdateAll(this.PrevJob); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NewRank, (UnityEngine.Object)null)) { this.NewRank.set_text(this.NextJobRank.ToString()); } if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.OldRank, (UnityEngine.Object)null)) { return; } this.OldRank.set_text(this.CurrentJobRank.ToString()); }
private void RefreshData() { GameManager instance = MonoSingleton <GameManager> .Instance; if (Object.op_Inequality((Object)this.MapInfo, (Object)null)) { QuestParam quest = instance.FindQuest(GlobalVars.SelectedQuestID); if (quest != null) { DataSource.Bind <QuestParam>(this.MapInfo, quest); GameParameter.UpdateAll(this.MapInfo); } } if (!Object.op_Inequality((Object)this.PartyInfo, (Object)null)) { return; } GlobalVars.SelectedPartyIndex.Set(7); PartyData party = instance.Player.Partys[(int)GlobalVars.SelectedPartyIndex]; if (party == null) { return; } DataSource.Bind <PartyData>(this.PartyInfo, party); GameParameter.UpdateAll(this.PartyInfo); }
public void Refresh(ItemData data) { this.mMaxNum = Mathf.Min(data.Num, 10); if (Object.op_Inequality((Object)this.WindowTitle, (Object)null)) { this.WindowTitle.set_text(LocalizedText.Get("sys.GACHA_TICKET_SELECT_TITLE", new object[1] { (object)data.Param.name })); } if (Object.op_Inequality((Object)this.AmountTicket, (Object)null)) { DataSource.Bind <ItemData>(this.AmountTicket, data); GameParameter.UpdateAll(this.AmountTicket); } if (Object.op_Inequality((Object)this.TicketNumSlider, (Object)null)) { ((UnityEventBase)this.TicketNumSlider.get_onValueChanged()).RemoveAllListeners(); this.TicketNumSlider.set_minValue(1f); this.TicketNumSlider.set_maxValue((float)this.mMaxNum); // ISSUE: method pointer ((UnityEvent <float>) this.TicketNumSlider.get_onValueChanged()).AddListener(new UnityAction <float>((object)this, __methodptr(OnUseNumChanged))); this.TicketNumSlider.set_value(this.TicketNumSlider.get_minValue()); } if (Object.op_Inequality((Object)this.BtnPlus, (Object)null)) { ((Selectable)this.BtnPlus).set_interactable((double)this.TicketNumSlider.get_value() + 1.0 <= (double)this.TicketNumSlider.get_maxValue()); } if (Object.op_Inequality((Object)this.BtnMinus, (Object)null)) { ((Selectable)this.BtnMinus).set_interactable((double)this.TicketNumSlider.get_value() - 1.0 >= (double)this.TicketNumSlider.get_minValue()); } this.UsedNum.text = this.TicketNumSlider.get_value().ToString(); this.gacham.UseTicketNum = (int)this.TicketNumSlider.get_value(); }
public void Refresh(Dictionary <string, int> dict) { if (dict == null || dict.Count < 0) { return; } GameManager instance = MonoSingleton <GameManager> .Instance; using (Dictionary <string, int> .KeyCollection.Enumerator enumerator = dict.Keys.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.Current; ItemParam itemParam = instance.MasterParam.GetItemParam(current); if (itemParam != null && dict[current] > 0) { ItemData data = new ItemData(); data.Setup(0L, itemParam, dict[current]); GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate); gameObject.get_transform().SetParent((Transform)this.ItemLayoutParent, false); DataSource.Bind <ItemData>(gameObject, data); this.mExpItems.Add(gameObject); gameObject.SetActive(true); } } } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public void Activated(int pinID) { if (pinID == 0) { switch (GlobalVars.SelectionCoinListType) { case GlobalVars.CoinListSelectionType.EventShop: if (UnityEngine.Object.op_Inequality((UnityEngine.Object)GlobalVars.SelectionEventShop, (UnityEngine.Object)null)) { GlobalVars.EventShopItem = GlobalVars.SelectionEventShop.EventShopInfo; GlobalVars.ShopType = EShopType.Event; Network.RequestAPI((WebAPI) new ReqGetCoinNum(new Network.ResponseCallback(this.ResponseCallback)), false); break; } break; case GlobalVars.CoinListSelectionType.ArenaShop: FlowNode_GameObject.ActivateOutputLinks((Component)this, 103); break; case GlobalVars.CoinListSelectionType.MultiShop: FlowNode_GameObject.ActivateOutputLinks((Component)this, 104); break; } } if (pinID != 1) { return; } GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public static GameObject CreateItemObject(GameObject node, GameObject newIcon, QuestResult.DropItemData item) { GameObject root = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)node); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)root, (UnityEngine.Object)null)) { DataSource.Bind <QuestResult.DropItemData>(root, item); if (item.mIsSecret) { DropItemIcon component = (DropItemIcon)root.GetComponent <DropItemIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null)) { component.IsSecret = true; } } root.SetActive(true); GameParameter.UpdateAll(root); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)newIcon, (UnityEngine.Object)null) && item.IsNew) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)newIcon); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { RectTransform transform = gameObject.get_transform() as RectTransform; ((Component)transform).get_gameObject().SetActive(true); transform.set_anchoredPosition(Vector2.get_zero()); ((Transform)transform).SetParent(root.get_transform(), false); } } } return(root); }
private void Refresh() { if (Object.op_Equality((Object)this.UnitTemplate, (Object)null)) { return; } List <UnitData> units = MonoSingleton <GameManager> .Instance.Player.Units; for (int index = 0; index < this.mUnits.Count; ++index) { this.mUnits[index].get_gameObject().SetActive(false); } ShopItem data1 = MonoSingleton <GameManager> .Instance.Player.GetShopData(GlobalVars.ShopType).items[GlobalVars.ShopBuyIndex]; ItemData itemDataByItemId = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(data1.iname); if (Object.op_Inequality((Object)this.EnableEquipUnitWindow, (Object)null)) { this.EnableEquipUnitWindow.get_gameObject().SetActive(false); int index1 = 0; for (int index2 = 0; index2 < units.Count; ++index2) { UnitData data2 = units[index2]; bool flag = false; for (int index3 = 0; index3 < data2.Jobs.Length; ++index3) { JobData job = data2.Jobs[index3]; if (job.IsActivated) { int equipSlotByItemId = job.FindEquipSlotByItemID(data1.iname); if (equipSlotByItemId != -1 && job.CheckEnableEquipSlot(equipSlotByItemId)) { flag = true; break; } } } if (flag) { if (index1 >= this.mUnits.Count) { this.UnitTemplate.SetActive(true); GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.UnitTemplate); gameObject.get_transform().SetParent((Transform)this.UnitLayoutParent, false); this.mUnits.Add(gameObject); this.UnitTemplate.SetActive(false); } GameObject gameObject1 = this.mUnits[index1].get_gameObject(); DataSource.Bind <UnitData>(gameObject1, data2); gameObject1.SetActive(true); this.EnableEquipUnitWindow.get_gameObject().SetActive(true); ++index1; } } } DataSource.Bind <ShopItem>(((Component)this).get_gameObject(), data1); DataSource.Bind <ItemData>(((Component)this).get_gameObject(), itemDataByItemId); DataSource.Bind <ItemParam>(((Component)this).get_gameObject(), MonoSingleton <GameManager> .Instance.GetItemParam(data1.iname)); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public void UnitSelect(long uniqueID) { DataSource.Bind <UnitData>(this.Parent, MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID(uniqueID)); this.SelectedUniqueId = uniqueID; FlowNode_GameObject.ActivateOutputLinks((Component)this, 1); GameParameter.UpdateAll(this.Parent); }
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); } } } } } } }
private void Start() { UnitData data = !string.IsNullOrEmpty(this.DebugUnitID) ? MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUnitID(this.DebugUnitID) : MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID); string skinVoiceSheetName = data.GetUnitSkinVoiceSheetName(-1); string sheetName = "VO_" + skinVoiceSheetName; string cueNamePrefix = data.GetUnitSkinVoiceCueName(-1) + "_"; this.mUnitVoice = new MySound.Voice(sheetName, skinVoiceSheetName, cueNamePrefix, false); this.PlayProfileVoice(); DataSource.Bind <UnitData>(((Component)this).get_gameObject(), data); GameParameter.UpdateAll(((Component)this).get_gameObject()); if (data == null) { return; } for (int index = 0; index < this.ProfileTexts.Length; ++index) { if (!Object.op_Equality((Object)this.ProfileTexts[index], (Object)null) && !string.IsNullOrEmpty(this.ProfileTexts[index].get_text())) { StringBuilder stringBuilder = GameUtility.GetStringBuilder(); stringBuilder.Append("unit."); stringBuilder.Append(data.UnitParam.iname); stringBuilder.Append("_"); stringBuilder.Append(this.ProfileTexts[index].get_text()); this.ProfileTexts[index].set_text(LocalizedText.Get(stringBuilder.ToString())); } } }
private void UpdateCostData() { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.m_root.GetComponent <Button>(), (UnityEngine.Object)null)) { return; } this.m_default.SetActive(false); this.m_ticket.SetActive(false); GachaRequestParam dataOfClass = DataSource.FindDataOfClass <GachaRequestParam>(this.m_root, (GachaRequestParam)null); if (dataOfClass == null) { return; } if (dataOfClass.IsTicketGacha) { ItemData itemDataByItemId = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(dataOfClass.Ticket); if (itemDataByItemId == null) { return; } DataSource.Bind <ItemData>(this.m_ticket, itemDataByItemId); this.m_ticket.SetActive(true); GameParameter.UpdateAll(this.m_ticket); } else { ((ImageArray)this.m_default_bg.GetComponent <ImageArray>()).ImageIndex = !dataOfClass.IsGold ? 1 : 0; this.RefreshCostNum(this.m_default_bg, dataOfClass.Cost); this.m_default.SetActive(true); } }
private void RefreshUI() { QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(GlobalVars.SelectedQuestID); this.mRecoverTime = MonoSingleton <GameManager> .Instance.TowerResuponse.rtime; if (quest != null && Object.op_Inequality((Object)this.ChallengeButton, (Object)null)) { DataSource.Bind <QuestParam>(((Component)this.ChallengeButton).get_gameObject(), quest); ((Selectable)this.ChallengeButton).set_interactable(quest.IsQuestCondition() && quest.state != QuestStates.Cleared); GameParameter.UpdateAll(((Component)this.ChallengeButton).get_gameObject()); } if (Object.op_Inequality((Object)this.RecoverButton, (Object)null)) { TowerResuponse towerResuponse = MonoSingleton <GameManager> .Instance.TowerResuponse; bool flag = towerResuponse.GetAvailableUnits().Count > 0 && towerResuponse.ExistDamagedUnit() || towerResuponse.GetDiedUnitNum() > 0; ((Selectable)this.RecoverButton).set_interactable(flag && !towerResuponse.is_reset); if (Object.op_Inequality((Object)this.RecoverTimer, (Object)null)) { this.RecoverTimer.SetActive(flag); } } if (Object.op_Inequality((Object)this.ResetButton, (Object)null)) { TowerResuponse towerResuponse = MonoSingleton <GameManager> .Instance.TowerResuponse; ((Component)this.ResetButton).get_gameObject().SetActive(towerResuponse.is_reset); ((Component)this.ChallengeButton).get_gameObject().SetActive(!towerResuponse.is_reset); this.ResetText.set_text(towerResuponse.reset_cost.ToString()); bool flag = (int)towerResuponse.reset_cost == 0; ((Component)this.ResetText).get_gameObject().SetActive(!flag); ((Component)this.ResetTextFree).get_gameObject().SetActive(flag); } this.SetAliveUnitsText(); this.SetRecoverText(); }
private void GenerateList(int page = 0) { this.mUnitList.ForEach((Action <GameObject>)(go => UnityEngine.Object.Destroy((UnityEngine.Object)go))); this.mUnitList.Clear(); for (int index1 = 0; index1 < 28; ++index1) { UnitData data = (UnitData)null; int index2 = index1 + page * 28; if (index2 < this.mDraftUnitListCache.Count) { Json_Unit jsonUnit = this.mDraftUnitListCache[index2].GetJson_Unit(); if (jsonUnit != null) { data = new UnitData(); data.Deserialize(jsonUnit); } } GameObject root = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.mGOUnitItem); DataSource.Bind <UnitData>(root, data); GameParameter.UpdateAll(root); root.get_transform().SetParent(this.mUnitParentTransform, false); root.SetActive(true); this.mUnitList.Add(root); } this.mPageNowTxt.set_text((this.mPage + 1).ToString()); if (this.mPage - 1 < 0) { FlowNode_GameObject.ActivateOutputLinks((Component)this, 21); } if (this.mPage + 1 < this.mPageMax) { return; } FlowNode_GameObject.ActivateOutputLinks((Component)this, 22); }
private void RefreshChapterTimer() { if (!Object.op_Inequality((Object)this.ChapterTimer, (Object)null)) { return; } bool flag = false; if (this.mCurrentChapter != null) { ChapterParam mCurrentChapter = this.mCurrentChapter; if (mCurrentChapter != null) { DataSource.Bind <ChapterParam>(this.ChapterTimer, mCurrentChapter); switch (mCurrentChapter.GetKeyQuestType()) { case KeyQuestTypes.Timer: flag = mCurrentChapter.key_end > 0L; break; case KeyQuestTypes.Count: flag = false; break; default: flag = mCurrentChapter.end > 0L; break; } } } this.ChapterTimer.SetActive(flag); GameParameter.UpdateAll(this.ChapterTimer); }
private void StartSuikomi() { this.mSuikomiStarted = true; GameObject gameObject = GameObjectID.FindGameObject("UI_TREASURE"); if (Object.op_Equality((Object)gameObject, (Object)null)) { Debug.LogError((object)"UI_TREASUREが見つかりませんでした。"); } else { this.mTargetRect = gameObject.get_transform() as RectTransform; } DataSource.Bind <ItemParam>(((Component)this).get_gameObject(), this.mDropItem.param); GameParameter.UpdateAll(((Component)this).get_gameObject()); this.mItemIcon = (ItemIcon)((Component)this).get_gameObject().GetComponent <ItemIcon>(); if (Object.op_Inequality((Object)this.mItemIcon, (Object)null)) { this.mItemIcon.Num.set_text(this.mDropItem.num.ToString()); } ((Component)this).get_transform().set_localScale(new Vector3(0.3f, 0.3f, 1f)); ((Component)this).get_transform().set_position(new Vector3((float)((Component)this).get_transform().get_position().x, (float)(((Component)this).get_transform().get_position().y + 25.0), (float)((Component)this).get_transform().get_position().z)); this.mEndAnimator = (Animator)gameObject.GetComponent <Animator>(); this.mEndAnimator.SetBool("open", false); }
private void CreateItems(QuestParam questParam) { if (questParam.bonusObjective == null) { return; } for (int index = 0; index < questParam.bonusObjective.Length; ++index) { QuestBonusObjective bonusObjective = questParam.bonusObjective[index]; QuestMissionItem rewardItem = this.CreateRewardItem(bonusObjective); if (bonusObjective.itemType == RewardType.ConceptCard) { ConceptCardIcon componentInChildren = (ConceptCardIcon)((Component)rewardItem).get_gameObject().GetComponentInChildren <ConceptCardIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)componentInChildren, (UnityEngine.Object)null)) { ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(bonusObjective.item); componentInChildren.Setup(cardDataForDisplay); } } rewardItem.SetGameParameterIndex(index); this.m_ListItems.Add(new QuestDetail.ViewParam() { ListItem = rewardItem, MissionIndex = index, IsAchieved = questParam.IsMissionClear(index) }); GameParameter.UpdateAll(((Component)rewardItem).get_gameObject()); } }
private void SetEnemy(MultiTowerFloorParam param) { int index1 = 0; if (param.map == null) { return; } string src = AssetManager.LoadTextData(AssetPath.LocalMap(param.map[0].mapSetName)); if (src == null) { return; } JSON_MapUnit jsonObject = JSONParser.parseJSONObject <JSON_MapUnit>(src); if (jsonObject == null || !Object.op_Inequality((Object)this.EnemyTemplate, (Object)null)) { return; } for (int index2 = 0; index2 < jsonObject.enemy.Length; ++index2) { NPCSetting npcSetting = new NPCSetting(jsonObject.enemy[index2]); Unit data = new Unit(); if (data != null && data.Setup((UnitData)null, (UnitSetting)npcSetting, (Unit.DropItem)null, (Unit.DropItem)null) && !data.IsGimmick) { GameObject root; if (index1 + 1 > this.mEnemyObject.Count) { root = (GameObject)Object.Instantiate <GameObject>((M0)this.EnemyTemplate); if (!Object.op_Equality((Object)root, (Object)null)) { this.mEnemyObject.Add(root); } else { continue; } } else { root = this.mEnemyObject[index1]; } DataSource.Bind <Unit>(root, data); GameParameter.UpdateAll(root); if (Object.op_Inequality((Object)this.EnemyRoot, (Object)null)) { root.get_transform().SetParent(this.EnemyRoot.get_transform(), false); } root.SetActive(true); ++index1; } } for (int index2 = index1; index2 < this.mEnemyObject.Count; ++index2) { this.mEnemyObject[index2].SetActive(false); } this.EnemyTemplate.SetActive(false); }
public void Refresh() { JSON_MyPhotonPlayerParam dataOfClass = DataSource.FindDataOfClass <JSON_MyPhotonPlayerParam>(((Component)this).get_gameObject(), (JSON_MyPhotonPlayerParam)null); if (dataOfClass != null) { if (Object.op_Inequality((Object)this.EmptyObj, (Object)null)) { this.EmptyObj.SetActive(false); } if (Object.op_Inequality((Object)this.ValidObj, (Object)null)) { this.ValidObj.SetActive(true); } if (Object.op_Inequality((Object)this.LeaderUnit, (Object)null) && dataOfClass.units != null) { dataOfClass.SetupUnits(); DataSource.Bind <UnitData>(this.LeaderUnit, dataOfClass.units[0].unit); } if (Object.op_Inequality((Object)this.Name, (Object)null)) { this.Name.set_text(dataOfClass.playerName); } if (Object.op_Inequality((Object)this.Lv, (Object)null)) { this.Lv.set_text(dataOfClass.playerLevel.ToString()); } if (Object.op_Inequality((Object)this.Total, (Object)null)) { this.Total.set_text(dataOfClass.totalAtk.ToString()); } if (Object.op_Inequality((Object)this.ReadyObj, (Object)null)) { this.ReadyObj.SetActive(dataOfClass.state != 4); } if (Object.op_Inequality((Object)this.Award, (Object)null)) { this.Award.get_gameObject().SetActive(false); this.Award.get_gameObject().SetActive(true); } GameParameter.UpdateAll(((Component)this).get_gameObject()); } else { if (Object.op_Inequality((Object)this.EmptyObj, (Object)null)) { this.EmptyObj.SetActive(true); } if (Object.op_Inequality((Object)this.ValidObj, (Object)null)) { this.ValidObj.SetActive(false); } if (!Object.op_Inequality((Object)this.ReadyObj, (Object)null)) { return; } this.ReadyObj.SetActive(false); } }
private void CreateCardSkillBonus(ConceptCardEffectsParam[] effect_params, int lv, int lv_cap, int awake_count_cap, bool is_enable) { if (Object.op_Equality((Object)this.mParamTemplate, (Object)null)) { return; } Transform parent = this.mParamTemplate.get_transform().get_parent(); List <string> stringList = new List <string>(); for (int index1 = 0; index1 < effect_params.Length; ++index1) { if (!string.IsNullOrEmpty(effect_params[index1].card_skill)) { SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(effect_params[index1].card_skill); if (skillParam != null && !string.IsNullOrEmpty(effect_params[index1].add_card_skill_buff_lvmax) && !stringList.Contains(skillParam.iname)) { BaseStatus status = new BaseStatus(); BaseStatus scale_status = new BaseStatus(); SkillData skill = new SkillData(); skill.Setup(skillParam.iname, lv, lv_cap, (MasterParam)null); SkillData.GetPassiveBuffStatus(skill, (BuffEffect[])null, EElement.None, ref status, ref scale_status); BaseStatus total_add = new BaseStatus(); BaseStatus total_scale = new BaseStatus(); effect_params[index1].GetAddCardSkillBuffStatusLvMax(lv, lv_cap, awake_count_cap, ref total_add, ref total_scale); string str1 = !Object.op_Inequality((Object)this.mParamStatusList, (Object)null) ? string.Empty : ((Object)this.mParamStatusList).get_name(); string str2 = !Object.op_Inequality((Object)this.mBonusStatusList, (Object)null) ? string.Empty : ((Object)this.mBonusStatusList).get_name(); GameObject root = (GameObject)Object.Instantiate <GameObject>((M0)this.mParamTemplate); root.get_transform().SetParent(parent, false); StatusList[] componentsInChildren = (StatusList[])root.GetComponentsInChildren <StatusList>(); for (int index2 = 0; index2 < componentsInChildren.Length; ++index2) { if (((Object)componentsInChildren[index2]).get_name().StartsWith(str1)) { componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, false); } else if (((Object)componentsInChildren[index2]).get_name().StartsWith(str2)) { componentsInChildren[index2].SetValues_Restrict(status, scale_status, total_add, total_scale, true); } } if (Object.op_Inequality((Object)this.mAwakeIconImageArray, (Object)null)) { this.mAwakeIconImageArray.ImageIndex = this.mAwakeIconImageArray.Images.Length - 1; } DataSource.Bind <SkillParam>(root, skillParam); DataSource.Bind <bool>(((Component)this).get_gameObject(), is_enable); GameParameter.UpdateAll(root); stringList.Add(skillParam.iname); ++this.mCreatedCount; } } } if (Object.op_Inequality((Object)this.mAwakeIconBgArray, (Object)null)) { this.mAwakeIconBgArray.ImageIndex = !is_enable ? 1 : 0; } this.mParamTemplate.SetActive(false); }
public void OnJobIconClick(GameObject target) { UnitEnhanceV3.Instance.OnJobSlotClick(target); DataSource.Bind <UnitData>(this.JobNameObject, UnitEnhanceV3.Instance.CurrentUnit); GameParameter.UpdateAll(((Component)this).get_gameObject()); this.UpdateJobSlotStates(true); this.ScrollClampedJobIcons.Focus(((Component)target.get_transform().get_parent()).get_gameObject(), false, false, 0.0f); }
public void Activated(int pinID) { if (pinID != 1) { return; } GameParameter.UpdateAll(((Component)this).get_gameObject()); }