void parseUnitInven(string[] p, bool checkNewItem = false) { if (checkNewItem && p != null) { saveNewInvenItem(unitInventoryList); } unitInventory.Clear(); unitInventoryList.Clear(); if (p == null) { return; } foreach (string key in p) { // if(string.IsNullOrEmpty(key)) continue; GameIDData ei = new GameIDData(); ei.parse(key, GameIDData.Type.Unit); if (unitInventory.ContainsKey(ei.serverId) == false) { unitInventory[ei.serverId] = ei; } unitInventoryList.Add(ei); } if (checkNewItem) { settingNewInvenItem(unitInventoryList, GameIDData.Type.Unit); } }
public void setStringData(string str, bool useCantUseCover = true, int slotIndex = -1) { GameIDData gd = new GameIDData(); gd.parse(str, GameIDData.Type.Equip); setData(gd, useCantUseCover, slotIndex); }
void parsePartsInven(string[] equipments, bool checkNewItem = false) { if (checkNewItem && equipments != null) { saveNewInvenItem(partsInventoryList); } partsInventory.Clear(); partsInventoryList.Clear(); if (equipments == null) { return; } int len = equipments.Length; for (int i = 0; i < len; ++i) { GameIDData ei = new GameIDData(); ei.parse(equipments[i], GameIDData.Type.Equip); if (partsInventory.ContainsKey(ei.serverId) == false) { partsInventory[ei.serverId] = ei; } partsInventoryList.Add(ei); } if (checkNewItem) { settingNewInvenItem(partsInventoryList, GameIDData.Type.Equip); } }
public void startFromSkill(GameIDData originalItemData, int slotIndex) { GameManager.me.uiManager.uiMenu.uiSkill.btnSort.gameObject.SetActive(false); _type = Type.Skill; // // if(originalSlot.isInventorySlot) // { // isTabSlot = (originalSlot.isChecked); // } // else // { // isTabSlot = true; // } // isTabSlot = !originalSlot.isInventorySlot; lbDefaultMessage.text = Util.getUIText("REINFORCE_SKILL"); GameManager.me.uiManager.uiMenu.uiSummon.btnSort.gameObject.SetActive(false); originalSlotIndex = slotIndex; originalData = new GameIDData(); originalData.parse(originalItemData.serverId, originalItemData.type); isTabSlot = (slotIndex < 0); slotOriginal.setData(UIChallengeItemSlot.Type.Skill, originalData); init(); GameManager.me.uiManager.uiMenu.uiSkill.invenList.draw(false); }
public GameIDData clone() { GameIDData gd = new GameIDData(); gd.parse(serverId, type); return(gd); }
public void setData(string id, GameIDData.Type type, bool include512Bg = false) { if (data == null) { data = new GameIDData(); } data.parse(id, type); switch (data.type) { case GameIDData.Type.Equip: lbName.text = data.partsData.name; break; case GameIDData.Type.Skill: lbName.text = data.skillData.name; break; case GameIDData.Type.Unit: lbName.text = data.unitData.name; break; } setLevel(data.level); lbMaxLevel.text = data.maxLevel.ToString(); showFrame(data.rare, include512Bg); }
public override void show(PopupData pd, string msg) { base.show(pd, msg); _data.parse((string)pd.data[0]); lbPrice.text = Util.GetCommaScore(_data.getSellPrice()); }
private void refreshSlots() { if (string.IsNullOrEmpty(nowHero) || GameDataManager.instance.serverHeroData.ContainsKey(nowHero) == false) { Debug.LogError("Error!"); return; } P_Hero heroData = GameDataManager.instance.serverHeroData[nowHero]; partsSlots[0].setStringData(heroData.selEqts[HeroParts.HEAD], false); partsSlots[1].setStringData(heroData.selEqts[HeroParts.BODY], false); partsSlots[2].setStringData(heroData.selEqts[HeroParts.WEAPON], false); partsSlots[3].setStringData(heroData.selEqts[HeroParts.VEHICLE], false); foreach (UIHeroInventorySlot ps in partsSlots) { ps.slotType = BaseSlot.InventorySlotType.HeroInfoSlot; } int i = 0; foreach (string u in GameDataManager.instance.getSelectUnitRunes(nowHero)) { if (string.IsNullOrEmpty(u)) { summonSlots[i].setData(null); } else { GameIDData gd = new GameIDData(); gd.parse(u, GameIDData.Type.Unit); summonSlots[i].setData(gd); summonSlots[i].slotType = BaseSlot.InventorySlotType.HeroInfoSlot; } ++i; } i = 0; foreach (string s in GameDataManager.instance.getSelectSkillRunes(nowHero)) { if (string.IsNullOrEmpty(s)) { skillSlots[i].setData(null); } else { GameIDData gd = new GameIDData(); gd.parse(s, GameIDData.Type.Skill); skillSlots[i].setData(gd); skillSlots[i].slotType = BaseSlot.InventorySlotType.HeroInfoSlot; } ++i; } }
public void loadEffectFromHeroSkillData(string id) { if (string.IsNullOrEmpty(id) == false) { _tempIdData.parse(id); if (GameManager.info.heroSkillData.ContainsKey(_tempIdData.resourceId)) { loadEffectFromHeroSkillData(_tempIdData.skillData); } } }
public HeroPartsItem(string character, string id) { if (string.IsNullOrEmpty(id)) { return; } characterId = character; partsId = id; itemInfo = new GameIDData(); itemInfo.parse(id, GameIDData.Type.Equip); parts = itemInfo.partsData; }
public void setData(string skillId) { if (string.IsNullOrEmpty(skillId)) { isOpen.Set(false); } else { infoData = new GameIDData(); infoData.parse(skillId, GameIDData.Type.Skill); id = infoData.id; isOpen.Set(true); } }
public void show(string serverId, bool didLoad, string prevReforgeId = null) { base.show(); step = 2; fromTabSlot = didLoad; _prevReforgeId = prevReforgeId; _data.parse(serverId); _prevData.parse(prevReforgeId); materialScrollView.transform.localPosition = Vector3.zero; materialScrollView.panel.clipOffset = Vector2.zero; materialScrollView.ResetPosition(); _materialData.Clear(); draw(); refreshInfo(true); _step = 0; switch (_data.type) { case GameIDData.Type.Unit: lbMaterialRemoveNotice.text = Util.getUIText("REFOREGE_UNIT"); break; case GameIDData.Type.Skill: lbMaterialRemoveNotice.text = Util.getUIText("REFOREGE_SKILL"); break; case GameIDData.Type.Equip: lbMaterialRemoveNotice.text = Util.getUIText("REFOREGE_EQUIP"); break; } }
void loadPlayerUnits(GamePlayerData gpd, bool isResourceType = false) { MonsterData md; if (gpd == null) { return; } if (isResourceType == false) { if (gpd.units != null) { foreach (string unitId in gpd.units) { if (string.IsNullOrEmpty(unitId) == false) { GameIDData eUnitInfo = new GameIDData(); eUnitInfo.parse(unitId, GameIDData.Type.Unit); md = GameManager.info.monsterData[eUnitInfo.unitData.resource]; gameDataManager.addLoadModelData(md); } } } } else { if (gpd.unitResourceId != null) { foreach (string unitId in gpd.unitResourceId) { if (string.IsNullOrEmpty(unitId) == false) { md = GameManager.info.monsterData[GameManager.info.unitData[unitId].resource]; gameDataManager.addLoadModelData(md); } } } } }
public void setData(string original, string source) { GameIDData originalData = new GameIDData(); GameIDData slotData = new GameIDData(); originalData.parse(original); slotData.parse(source); slotOriginal.setData(original); slotSource.setData(source); slotSource.setData(UIChallengeItemSlot.Type.Unit, slotData); int price = GameDataManager.instance.composePrices["UNIT" + RareType.SERVER_CHARACTER[originalData.rare]]; slotResult.gameObject.SetActive(true); slotResult.setRare(originalData.rare + 1); slotResult.setLevel(1); slotResult.spBackground.gameObject.SetActive(true); slotResult.spBackground.spriteName = UIHeroInventorySlot.SLOT_BG_QUESTION; lbPrice.text = Util.GetCommaScore(price); }
public void startFromSummon(GameIDData originalItemData, int slotIndex) { _type = Type.Unit; // isTabSlot = !originalSlot.isInventorySlot; lbDefaultMessage.text = Util.getUIText("COMPOSE_UNIT"); GameManager.me.uiManager.uiMenu.uiSummon.btnSort.gameObject.SetActive(false); originalSlotIndex = slotIndex; originalData = new GameIDData(); originalData.parse(originalItemData.serverId, originalItemData.type); isTabSlot = (slotIndex < 0); slotOriginal.setData(UIChallengeItemSlot.Type.Unit, originalData); init(); GameManager.me.uiManager.uiMenu.uiSummon.invenList.draw(false); }
public void startFromHeroInven(GameIDData originalItemData, int slotIndex) { _type = Type.Equip; isTabSlot = false; lbDefaultMessage.text = Util.getUIText("REINFORCE_EQUIP"); GameManager.me.uiManager.uiMenu.uiHero.btnSort.gameObject.SetActive(false); originalSlotIndex = slotIndex; originalData = new GameIDData(); originalData.parse(originalItemData.serverId, originalItemData.type); slotOriginal.setData(UIChallengeItemSlot.Type.Equip, originalData); init(); GameManager.me.uiManager.uiMenu.uiHero.btnSort.gameObject.SetActive(false); GameManager.me.uiManager.uiMenu.uiHero.invenList.draw(false); // GameManager.me.uiManager.uiMenu.uiHero.btnShowCharacterInfo.isEnabled = false; }
IEnumerator addMyJackPotCT(string itemId, string productName) { yield return(new WaitForSeconds(6.0f)); _checkGd.parse(itemId); if (_checkGd.rare >= RareType.S) { P_Jackpot p = getNewJackPotData(); p.itemId = itemId; p.userId = PandoraManager.instance.localUser.userID; p.nickname = GameDataManager.instance.name; p.product = productName; p.date = Util.DateTimeToTimeStamp(DateTime.UtcNow); _myJackPotList.Enqueue(p); if (_nextDelay > 8.0f) { _nextDelay = 8.0f; } } }
public void startFromHeroTab(GameIDData originalItemData) { _type = Type.Equip; isTabSlot = true; lbDefaultMessage.text = Util.getUIText("REINFORCE_EQUIP"); GameManager.me.uiManager.uiMenu.uiHero.btnSort.gameObject.SetActive(false); originalSlotIndex = -1; originalData = new GameIDData(); originalData.parse(originalItemData.serverId, originalItemData.type); // GameIDData test = new GameIDData(); // test.parse("LEO_HD2_1_10_0", GameIDData.Type.Equip); // originalData = test; // // GameIDData test2 = new GameIDData(); // test2.parse("LEO_BD2_1_10_0", GameIDData.Type.Equip); // GameIDData test3 = new GameIDData(); // test3.parse("LEO_HD2_1_5_0", GameIDData.Type.Equip); // originalItemData = test; slotOriginal.setData(UIChallengeItemSlot.Type.Equip, originalData); init(); GameManager.me.uiManager.uiMenu.uiHero.invenList.draw(false); // GameManager.me.uiManager.uiMenu.uiHero.btnShowCharacterInfo.isEnabled = false; // sourceList.Add(test2); // sourceList.Add(test3); // refresh(); }
public void setData(string id) { // UnityEngine.Debug.Log(id); if (string.IsNullOrEmpty(id)) { isOpen.Set(false); } else { unitInfo = new GameIDData(); unitInfo.parse(id, GameIDData.Type.Unit); if (GameManager.info.unitData.ContainsKey(unitInfo.resourceId)) { unitData = GameManager.info.unitData[unitInfo.resourceId]; isOpen.Set(true); } else { isOpen.Set(false); } } }
public void setData(string itemId) { inputItemId = itemId; switch (itemId.Substring(0, 2)) { case "EN": type = Type.GameItem; infoData.type = GameIDData.Type.None; _iconResourceId = WSDefine.ICON_REWARD_ENERGY; lbInforceLevel.text = itemId.Substring(itemId.LastIndexOf("_") + 1); lbInforceLevel.pivot = UIWidget.Pivot.Bottom; break; case "GO": type = Type.GameItem; infoData.type = GameIDData.Type.None; _iconResourceId = WSDefine.ICON_REWARD_GOLD; lbInforceLevel.text = itemId.Substring(itemId.LastIndexOf("_") + 1); lbInforceLevel.pivot = UIWidget.Pivot.Bottom; break; case "RU": type = Type.GameItem; infoData.type = GameIDData.Type.None; _iconResourceId = WSDefine.ICON_REWARD_RUBY; lbInforceLevel.text = itemId.Substring(itemId.LastIndexOf("_") + 1); lbInforceLevel.pivot = UIWidget.Pivot.Bottom; break; case "RS": type = Type.GameItem; infoData.type = GameIDData.Type.None; _iconResourceId = WSDefine.ICON_REWARD_RUNESTONE; lbInforceLevel.text = itemId.Substring(itemId.LastIndexOf("_") + 1); lbInforceLevel.pivot = UIWidget.Pivot.Bottom; break; case "EX": type = Type.GameItem; _iconResourceId = WSDefine.ICON_REWARD_EXP; infoData.type = GameIDData.Type.None; lbInforceLevel.text = itemId.Substring(itemId.LastIndexOf("_") + 1); lbInforceLevel.pivot = UIWidget.Pivot.Bottom; break; case "LE": case "KI": case "CH": type = Type.Equip; infoData.parse(itemId, GameIDData.Type.Equip); _iconResourceId = infoData.resourceId; lbInforceLevel.pivot = UIWidget.Pivot.BottomRight; break; case "SK": type = Type.Skill; infoData.parse(itemId, GameIDData.Type.Skill); _iconResourceId = infoData.resourceId; lbInforceLevel.pivot = UIWidget.Pivot.BottomRight; break; case "UN": type = Type.Unit; infoData.parse(itemId, GameIDData.Type.Unit); _iconResourceId = infoData.resourceId; lbInforceLevel.pivot = UIWidget.Pivot.BottomRight; break; } draw(); useButton = false; select = false; }
IEnumerator playTranscendResultCT(string newId, string sourceId, GameIDData.Type cType) { reinforceSlotContainer.SetActive(false); RuneStudioMain.instance.rootTranscend.gameObject.SetActive(true); transcendMovablePanelParent.parent.transform.localScale = new Vector3(1, 1, 1); transcendMovablePanelParent.transform.localScale = new Vector3(1, 1, 1); type = Type.Transcend; transcendType = cType; transcendResultId = newId; transcendResultData.parse(newId, cType); transcendOriginalData.parse(sourceId); reinforceSlotContainer.SetActive(true); for (int i = 0; i < 5; ++i) { Renderer ren; if (i < 2) { GameIDData temp = new GameIDData(); if (i == 0) { temp.parse(sourceId, cType); } else if (i == 1) { if (string.IsNullOrEmpty(UIRuneReforegePopup.currentIngredientId) == false) { temp.parse(UIRuneReforegePopup.currentIngredientId, cType); } else { temp.parse(sourceId, cType); } } //if(i == 0) { switch (temp.type) { case GameIDData.Type.Equip: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Equip, temp); break; case GameIDData.Type.Unit: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Unit, temp); break; case GameIDData.Type.Skill: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Skill, temp); break; } } // else if(i == 1) // { // reinforceSlots[i].setData(WSDefine.RUNESTONE+"_1"); // reinforceSlots[i].showLevelBar = false; // } reinforceRenderingSlot[i].enabled = true; } else { ren = reinforceRenderingSlot[i].GetComponent <Renderer>(); reinforceRenderingSlot[i].enabled = false; } } if (cType == GameIDData.Type.Unit) { while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; GameDataManager.instance.addLoadModelData(GameManager.info.monsterData[transcendResultData.unitData.resource]); GameDataManager.instance.startModelLoad(); while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); } else if (cType == GameIDData.Type.Equip) { spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); } cam256.gameObject.SetActive(true); sendEvent(transcendStarter); if (TutorialManager.instance.isTutorialMode == false) { GameManager.me.uiManager.activeRuneStudioSkipButton(); step = Step.Start; } }
IEnumerator playMakeCt(string[] results) { _leftDisplayItems.Clear(); card10Container.gameObject.SetActive(false); reinforceSlotContainer.SetActive(false); type = Type.UnitMake; GameIDData.Type itemType = GameIDData.Type.Equip; while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; bool hasLoadingModel = false; for (int i = 0; i < results.Length; ++i) { itemType = GameIDData.getItemTypeById(results[i]); if (itemType == GameIDData.Type.None) { continue; } GameIDData d = new GameIDData(); d.parse(results[i], itemType); _leftDisplayItems.Add(d); switch (itemType) { case GameIDData.Type.Unit: GameDataManager.instance.addLoadModelData(GameManager.info.monsterData[d.unitData.resource]); hasLoadingModel = true; break; } } _nowDisplayIndex = 0; isFirstCard = true; if (hasLoadingModel) { GameDataManager.instance.startModelLoad(); while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; } sendEvent(makeStarter); yield return(new WaitForSeconds(0.4f)); if ((_leftDisplayItems.Count == 5 || _leftDisplayItems.Count == 10) && TutorialManager.instance.isTutorialMode == false) { GameManager.me.uiManager.activeRuneStudioSkipButton(); step = Step.Start; } else { GameManager.me.uiManager.goBtnRuneStudioSkip.SetActive(false); } }
public void playReinforceResult(string newId, string[] sourceIds, GameIDData.Type rType) { reinforceMoveablePanelParent.transform.localScale = new Vector3(1, 1, 1); reinforceResultId = newId; type = Type.Reinforce; reinforceType = rType; GameManager.me.uiManager.uiMenu.uiHero.selectedSlot = null; GameManager.me.uiManager.uiMenu.uiSkill.selectSlot = null; GameManager.me.uiManager.uiMenu.uiSummon.selectSlot = null; reinforceSlotContainer.SetActive(true); for (int i = 0; i < 5; ++i) { Renderer ren; if (i < sourceIds.Length) { GameIDData temp = new GameIDData(); temp.parse(sourceIds[i], reinforceType); switch (temp.type) { case GameIDData.Type.Equip: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Equip, temp); break; case GameIDData.Type.Unit: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Unit, temp); break; case GameIDData.Type.Skill: reinforceSlots[i].setData(UIChallengeItemSlot.Type.Skill, temp); break; } reinforceRenderingSlot[i].enabled = true; } else { ren = reinforceRenderingSlot[i].GetComponent <Renderer>(); reinforceRenderingSlot[i].enabled = false; } } reinforceResultData.parse(newId, reinforceType); // 강화되기 전 데이터를 먼저 보여준다. switch (reinforceResultData.type) { case GameIDData.Type.Equip: GameManager.me.uiManager.uiMenu.uiHero.itemDetailPopup.show(reinforceOriginalData, RuneInfoPopup.Type.Reinforce, UIReinforceBarPanel.isTabSlot == false); spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); break; case GameIDData.Type.Skill: GameManager.me.uiManager.popupSkillPreview.show(reinforceOriginalData, RuneInfoPopup.Type.Reinforce, UIReinforceBarPanel.isTabSlot == false, true); break; case GameIDData.Type.Unit: GameManager.me.uiManager.popupSummonDetail.show(reinforceOriginalData, RuneInfoPopup.Type.Reinforce, UIReinforceBarPanel.isTabSlot == false); spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); break; } cam256.gameObject.SetActive(true); sendEvent(reinforceStarter); if (TutorialManager.instance.isTutorialMode == false) { GameManager.me.uiManager.activeRuneStudioSkipButton(); step = Step.Start; } }
void draw(int act, string name, int league, int showPhoto = WSDefine.TRUE, string photoUrl = "") { _isMain = true; _currentAct = act; _name = name; lbName.text = name; _showPhoto = showPhoto; _photoUrl = photoUrl; setLeague(league); _playerMainData = new GamePlayerData(_mainHero.name); DebugManager.instance.setPlayerData(_playerMainData, false, _mainHero.name, _mainHero.selEqts[HeroParts.HEAD], _mainHero.selEqts[HeroParts.BODY], _mainHero.selEqts[HeroParts.WEAPON], _mainHero.selEqts[HeroParts.VEHICLE]); int i = 0; if (selectUnitRunes == null) { _selectUnitRunes[0] = null; _selectUnitRunes[1] = null; _selectUnitRunes[2] = null; _selectUnitRunes[3] = null; _selectUnitRunes[4] = null; } else { foreach (KeyValuePair <string, string> kv in selectUnitRunes) { if (string.IsNullOrEmpty(kv.Value)) { _selectUnitRunes[i] = null; } else { GameIDData gd = new GameIDData(); gd.parse(kv.Value, GameIDData.Type.Unit); _selectUnitRunes[i] = gd; } ++i; } } i = 0; if (selectSkillRunes == null) { _selectSkillRunes[0] = null; _selectSkillRunes[1] = null; _selectSkillRunes[2] = null; } else { foreach (KeyValuePair <string, string> kv in selectSkillRunes) { if (string.IsNullOrEmpty(kv.Value)) { _selectSkillRunes[i] = null; } else { GameIDData gd = new GameIDData(); gd.parse(kv.Value, GameIDData.Type.Skill); _selectSkillRunes[i] = gd; } ++i; } } if (_subHero != null) { _playerSubData = new GamePlayerData(_subHero.name); DebugManager.instance.setPlayerData(_playerSubData, false, _subHero.name, _subHero.selEqts[HeroParts.HEAD], _subHero.selEqts[HeroParts.BODY], _subHero.selEqts[HeroParts.WEAPON], _subHero.selEqts[HeroParts.VEHICLE]); i = 0; foreach (KeyValuePair <string, string> kv in selectSubUnitRunes) { if (string.IsNullOrEmpty(kv.Value)) { _selectSubUnitRunes[i] = null; } else { if (_selectSubUnitRunes[i] == null) { _selectSubUnitRunes[i] = new GameIDData(); } _selectSubUnitRunes[i].parse(kv.Value, GameIDData.Type.Unit); } ++i; } i = 0; foreach (KeyValuePair <string, string> kv in selectSubSkillRunes) { if (string.IsNullOrEmpty(kv.Value)) { _selectSubSkillRunes[i] = null; } else { if (_selectSubSkillRunes[i] == null) { _selectSubSkillRunes[i] = new GameIDData(); } _selectSubSkillRunes[i].parse(kv.Value, GameIDData.Type.Skill); } ++i; } } draw(); }
public void show(GameIDData d, RuneInfoPopup.Type type, int rare, int level, bool isInventorySlot = true, bool isFirstSequenceForReinforce = true, GameIDData compareData = null) { spSkipModeBackground.gameObject.SetActive(false); spBackground.gameObject.SetActive(true); // btnPlayAttack.gameObject.SetActive((type == Type.Book)); // btnPlayDeadAni.gameObject.SetActive((type == Type.Book)); // btnPlaySkillAni.gameObject.SetActive(false); #if UNITY_EDITOR if (DebugManager.instance.useDebug == false) #endif { GamePlayerData nowPlayerData; if (GameManager.me.uiManager.uiMenu.uiSummon.gameObject.activeSelf && GameDataManager.instance.serverHeroData.Count > 1 && GameDataManager.instance.heroes.ContainsKey(GameManager.me.uiManager.uiMenu.uiSummon.tabPlayer.currentTab)) { nowPlayerData = GameDataManager.instance.heroes[GameManager.me.uiManager.uiMenu.uiSummon.tabPlayer.currentTab]; } else { nowPlayerData = GameDataManager.selectedPlayerData; } GameManager.me.changeMainPlayer(nowPlayerData, nowPlayerData.id, nowPlayerData.partsVehicle.parts.resource.ToUpper()); } if (GameManager.me.effectManager.isCompleteLoadEffect == false) { if (GameManager.me.effectManager.didStartLoadEffect == false) { GameManager.me.effectManager.startLoadEffects(true); } } _isOpenRuneBook = GameManager.me.uiManager.popupRuneBook.gameObject.activeSelf; if (_isOpenRuneBook) { GameManager.me.uiManager.uiMenuCamera.camera.enabled = false; } data.parse(d.serverId); _compareData = compareData; _rare = rare; reinforceInfoBar.setReinforceData(data); isFromInventorySlot = isInventorySlot; popupType = type; if (sample != null) { GameManager.me.characterManager.cleanMonster(sample); sample = null; } descriptionContainer.SetActive(popupType != RuneInfoPopup.Type.Make); cardFrame.showDescriptionPanel(popupType != RuneInfoPopup.Type.Make, false); RuneStudioMain.instance.cam512.gameObject.SetActive(true); characterRotate.canRotate = true; rotater.enabled = (type == RuneInfoPopup.Type.Make); SoundData.play("uicm_popup_mid"); movablePanel.localPosition = new Vector3(-3000, 0, 0); spBackground.color = new Color(0, 0, 0, 100.0f / 255.0f); gameObject.SetActive(true); characterRotate.state = UICharacterRotate.STATE_NORMAL; btnClose.gameObject.SetActive(type != RuneInfoPopup.Type.Reinforce); _activeButtons.Clear(); if (type == RuneInfoPopup.Type.Reinforce && isFirstSequenceForReinforce) { btnInstantBuy.gameObject.SetActive(false); btnBreak.gameObject.SetActive(false); btnPutOn.gameObject.SetActive(false); btnPutOff.gameObject.SetActive(false); btnReinfoce.gameObject.SetActive(false); btnCompose.gameObject.SetActive(false); btnEvolution.gameObject.SetActive(false); btnReforge.gameObject.SetActive(false); goCannotWear.SetActive(false); } else if (type == RuneInfoPopup.Type.Book || type == RuneInfoPopup.Type.PreviewOnly || type == RuneInfoPopup.Type.Make) { // challengeItemData = null; btnInstantBuy.gameObject.SetActive(false); btnBreak.gameObject.SetActive(false); btnPutOn.gameObject.SetActive(false); btnPutOff.gameObject.SetActive(false); btnReinfoce.gameObject.SetActive(false); btnCompose.gameObject.SetActive(false); btnEvolution.gameObject.SetActive(false); btnReforge.gameObject.SetActive(false); goCannotWear.SetActive(false); } else //Normal, Reinforce { // challengeItemData = null; btnInstantBuy.gameObject.SetActive(false); btnBreak.gameObject.SetActive(true); btnReinfoce.gameObject.SetActive(true); // 탭에서 온 녀석. if (isFromInventorySlot == false) { btnBreak.isEnabled = false; btnPutOn.gameObject.SetActive(false); btnPutOff.gameObject.SetActive(true); goCannotWear.SetActive(false); } // 일반으로 온 녀석. else { btnBreak.isEnabled = true; btnPutOff.gameObject.SetActive(false); if (GameManager.me.uiManager.uiMenu.uiSummon.checkCanPutOn(data.unitData)) { btnPutOn.gameObject.SetActive(true); goCannotWear.SetActive(false); } else { goCannotWear.SetActive(true); btnPutOn.gameObject.SetActive(false); lbWearCharacter.text = Util.getUIText("STR_USE_THIS", Util.getUIText(GameManager.me.uiManager.uiMenu.uiSummon.lastCheckPutOnCharacter)); } } btnReinfoce.gameObject.SetActive(true); // * 제련 원본 룬 : 제련 레벨 99 미만의 SS등급 소환룬, 스킬룬, 히어로장비 (A이하 : 합성 버튼 / S : 진화 버튼 / SS : 제련 버튼) // * 제련 재료 룬 : (등급부분을 제외하고) 원본 룬과 동일한 베이스 아이디를 가진 SS등급 or S등급 // 예> UN613 의 제련 재료 : UN613, UN513 // SK_6110 : SK6110, SK5110 // LEO_BD6_22 : LEO_BD6_22, LEO_BD5_22 // * 제련 시, 100,000 골드 소모 if (data.canReforge()) { // btnReinfoce.isEnabled = false; btnReforge.gameObject.SetActive(true); } else { // btnReinfoce.isEnabled = true; btnReforge.gameObject.SetActive(false); } btnEvolution.gameObject.SetActive(data.rare == RareType.S); btnCompose.gameObject.SetActive(data.rare < RareType.S); } _v.y = -253f; _v.z = -56f; if (goCannotWear.activeSelf) { _activeButtons.Add(goCannotWear); } if (btnPutOn.gameObject.activeSelf) { _activeButtons.Add(btnPutOn.gameObject); } if (btnPutOff.gameObject.activeSelf) { _activeButtons.Add(btnPutOff.gameObject); } if (btnReinfoce.gameObject.activeSelf) { _activeButtons.Add(btnReinfoce.gameObject); } if (btnReforge.gameObject.activeSelf) { _activeButtons.Add(btnReforge.gameObject); } if (btnCompose.gameObject.activeSelf) { _activeButtons.Add(btnCompose.gameObject); } if (btnEvolution.gameObject.activeSelf) { _activeButtons.Add(btnEvolution.gameObject); } for (int i = _activeButtons.Count - 1; i >= 0; --i) { _v.x = 323 - i * (323 - 177); _activeButtons[i].transform.localPosition = _v; } _activeButtons.Clear(); cardFrame.showFrame(_rare); cardFrame.setTranscendLevel(data); if (data.unitData.atkPhysic > data.unitData.atkMagic) { spIconPhysicOrMagic.spriteName = "icn_animal_character_physicsattack"; strIconDescription[0] = Util.getUIText("STYPE_ATKPHYSIC"); } else { spIconPhysicOrMagic.spriteName = "icn_animal_character_magicattack"; strIconDescription[0] = Util.getUIText("STYPE_ATKMAGIC"); } if (data.unitData.attackType.type == 1 || data.unitData.attackType.type == 3) { spIconTargetingType.spriteName = "icn_animal_character_oneattack"; strIconDescription[1] = Util.getUIText("STYPE_ONEATK"); } else { spIconTargetingType.spriteName = "icn_animal_character_multiattack"; strIconDescription[1] = Util.getUIText("STYPE_MULTIATK"); } if (data.unitData.attackType.type == 1 || data.unitData.attackType.type == 2) { spIconRange.spriteName = "icn_animal_character_shortdistance"; strIconDescription[2] = Util.getUIText("STYPE_SHORTATK"); } else { if (data.unitData.attackType.type == 14) { spIconRange.spriteName = "icn_skill_character_buster"; strIconDescription[2] = Util.getUIText("STYPE_BUSTATK"); } else { spIconRange.spriteName = "icn_animal_character_longdistance"; strIconDescription[2] = Util.getUIText("STYPE_LONGATK"); } } for (int i = 0; i < 3; ++i) { lbIconDescription[i].text = strIconDescription[i]; } cardFrame.lbName.text = data.unitData.name; if (_compareData != null && popupType != RuneInfoPopup.Type.Book) { cardFrame.setLevel(level, (level - _compareData.level)); } else { cardFrame.setLevel(level); } sb.Length = 0; sb2.Length = 0; tabPassiveInfo[0].transform.parent.gameObject.SetActive(type == RuneInfoPopup.Type.Book && data.rare >= RareType.S); setPassiveInfo(0); setDescription(popupType == RuneInfoPopup.Type.Book, data); _q = sampleContainer.localRotation; //_v.x = 0; _v.y = 21; _v.z = 0; _q.eulerAngles = _v; sampleContainer.localRotation = _q; if (sample == null) { StartCoroutine(getMonster(sample, data.unitData, sampleContainer, _rare)); } showProcess2(); visibleComposeNoticeMark(); // btnPlaySkillAni.gameObject.SetActive((type == Type.Book) && getActiveUnitSkillAttackType() > -1); }
public void show(GameIDData d, RuneInfoPopup.Type type, bool isInventorySlot, bool isFirstSequenceForReinforce = true, GamePlayerData gpd = null, GameIDData compareData = null) { spBackground.gameObject.SetActive(true); spSkipModeBackground.gameObject.SetActive(false); popupType = type; simpleRotater.enabled = false; isFromInventorySlot = isInventorySlot; SoundData.play("uihe_itempopup"); movablePanel.localPosition = new Vector3(-3000, 0, 0); if (type == RuneInfoPopup.Type.Reinforce || type == RuneInfoPopup.Type.Make || type == RuneInfoPopup.Type.Compose || type == RuneInfoPopup.Type.Evolve || type == RuneInfoPopup.Type.Transcend) { spBackground.color = new Color(0, 0, 0, 1f / 255f); } else { spBackground.color = new Color(0, 0, 0, 100f / 255f); } RuneStudioMain.instance.cam512.gameObject.SetActive(true); data.parse(d.serverId); _compareData = compareData; showFrame(); setCharacter(gpd); descriptionContainer.SetActive(popupType != RuneInfoPopup.Type.Make); cardFrame.showDescriptionPanel(popupType != RuneInfoPopup.Type.Make, true); cardFrame.lbName.text = data.partsData.name; if (_compareData != null && popupType != RuneInfoPopup.Type.Book) { cardFrame.setLevel(data.level, (data.level - _compareData.level)); } else { cardFrame.setLevel(data.level); } gameObject.SetActive(true); btnClose.gameObject.SetActive(type != RuneInfoPopup.Type.Reinforce || isFirstSequenceForReinforce == false); setButtons(isFirstSequenceForReinforce); visibleComposeNoticeMark(); tabSGradeInfo[0].transform.parent.gameObject.SetActive(type == RuneInfoPopup.Type.Book && (data.rare >= RareType.S)); setSGradeInfo(0); setStat(isFirstSequenceForReinforce, data); if (sampleHero != null) { sampleHero.shadow.gameObject.SetActive(false); if (sampleHero.pet != null) { sampleHero.pet.shadow.gameObject.SetActive(false); } } reinforceInfoBar.setReinforceData(data); showProcess2(); }
IEnumerator playComposeResultCT(string newId, string[] sourceIds, GameIDData.Type cType) { reinforceSlotContainer.SetActive(false); RuneStudioMain.instance.rootCompose.gameObject.SetActive(true); composeMovablePanelParent.transform.localScale = new Vector3(1, 1, 1); type = Type.Compose; composeType = cType; composeResultId = newId; composeResultData.parse(newId, cType); composeCardFrame1.setData(sourceIds[0], cType); composeCardFrame2.setData(sourceIds[1], cType); showCard512Studio(100); if (cType == GameIDData.Type.Unit) { while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; GameDataManager.instance.addLoadModelData(GameManager.info.monsterData[composeCardFrame1.data.unitData.resource]); GameDataManager.instance.addLoadModelData(GameManager.info.monsterData[composeCardFrame2.data.unitData.resource]); GameDataManager.instance.startModelLoad(); while (GameDataManager.instance.isCompleteLoadModel == false) { yield return(null); } ; spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); } else if (cType == GameIDData.Type.Equip) { spSkillIcon.cachedTransform.parent.gameObject.SetActive(false); } card2Container.gameObject.SetActive(true); card2BgSlot[0].customSizeRatio = 1.85f; card2BgSlot[1].customSizeRatio = 1.85f; card2BgSlot[0].setData(composeCardFrame1.data); card2BgSlot[1].setData(composeCardFrame2.data); composeResultData.parse(newId, cType); cam512.gameObject.SetActive(true); sendEvent(composeController[composeCardFrame1.data.rare]); if (TutorialManager.instance.isTutorialMode == false) { yield return(new WaitForSeconds(0.4f)); step = Step.Start; GameManager.me.uiManager.activeRuneStudioSkipButton(); } }
public void init(TranscendData transcendData, int[] transcendLevel, bool isPlayerUnitData, string id, bool isPlayerMon = false, TYPE type = Monster.TYPE.UNIT, StageMonsterData sMonData = null, bool isPetMonster = false) { #if UNITY_EDITOR cTransform.gameObject.name = ((isPlayerMon)?"pm":"em") + randomNum++; tf.gameObject.name = cTransform.gameObject.name; #endif resetDefaultVals(); if (particleEffect != null) { GameManager.me.effectManager.setParticleEffect(particleEffect); } isPet = isPetMonster; isPlayerSide = isPlayerMon; fowardDirectionValue = (isPlayerSide?1000.0f:-1000.0f); isDeleteObject = false; _v = tf.localScale; _v.x = 1.0f; _v.y = 1.0f; _v.z = 1.0f; tf.localScale = _v; _q = tf.rotation; _v = _q.eulerAngles; _v.x = 0.0f; if (isPlayerSide) { _v.y = 90.0f; } else { _v.y = 270.0f; } _v.z = 0.0f; _q.eulerAngles = _v; tf.rotation = _q; isMonster = true; npcData = null; unitData = null; heroMonsterData = null; stageMonsterData = sMonData; stat.monsterType = type; bool needToSetRareEffect = false; if (type == TYPE.UNIT) { isHero = false; unitData = GameManager.info.unitData[id]; unitData.setDataToCharacter(this, transcendData, transcendLevel); if (isPlayerMon) { // GameManager.me.player.unitHpUp 소환생명력증가 // GameManager.me.player.unitDefUp float tempF = maxHp; tempF += tempF * GameManager.me.player.unitHpUp(unitData); // stat.unitHpUp; maxHp = tempF; hp = tempF; tempF = stat.defMagic; tempF += tempF * GameManager.me.player.unitDefUp(unitData); //.stat.unitDefUp; stat.defMagic = tempF; tempF = stat.defPhysic; tempF += tempF * GameManager.me.player.unitDefUp(unitData); //.stat.unitDefUp; stat.defPhysic = tempF; if (unitData.rare > 0) { needToSetRareEffect = true; } } else if (isPlayerUnitData) // 적인데 주인공 소환수 데이터를 갖고 있으면 걔는 무조건 PVP! { float tempF = maxHp; tempF += tempF * GameManager.me.pvpPlayer.unitHpUp(unitData); //.stat.unitHpUp; maxHp = tempF; hp = tempF; tempF = stat.defMagic; tempF += tempF * GameManager.me.pvpPlayer.unitDefUp(unitData); //..stat.unitDefUp; stat.defMagic = tempF; tempF = stat.defPhysic; tempF += tempF * GameManager.me.pvpPlayer.unitDefUp(unitData); //..stat.unitDefUp; stat.defPhysic = tempF; if (unitData.rare > 0) { needToSetRareEffect = true; } } #if UNITY_EDITOR cTransform.gameObject.name += "_" + unitData.rare; tf.gameObject.name = cTransform.gameObject.name; #endif setAniData(Monster.ATK_IDS[unitData.attackType.type]); setDefaultHitRange(_tempAniData, false); //(unitData.attackType.type == 1 || unitData.attackType.type == 2)); if (unitData.skill != null && unitData.skill.Length > 0) { skillSlots = new UnitSkillSlot[unitData.skill.Length]; _skillSlotsNum = skillSlots.Length; for (i = 0; i < _skillSlotsNum; ++i) { skillSlots[i] = new UnitSkillSlot(); skillSlots[i].setData(this, GameManager.info.unitSkillData[unitData.skill[i]]); } } else { skillSlots = null; } } else if (type == TYPE.HERO) // 히어로.... { isHero = true; heroMonsterData = GameManager.info.heroMonsterData[id]; heroMonsterData.setDataToCharacter(this); setAniData(Monster.ATK_IDS[heroMonsterData.attackType.type]); setDefaultHitRange(_tempAniData, false); //(heroMonsterData.attackType.type == 1 || heroMonsterData.attackType.type == 2)); setUpdateWhenOffscreen(true); int len = 0; if (stageMonsterData != null) { if (stageMonsterData.units != null) { _unitSlotsNum = stageMonsterData.units.Length; unitSlots = new UnitSlot[_unitSlotsNum]; len = unitSlots.Length; for (i = 0; i < len; ++i) { unitSlots[i] = new UnitSlot(); unitSlots[i].setData(this, GameManager.info.unitData[stageMonsterData.units[i]]); } } _skillSlotsNum = stageMonsterData.skills.Length; skillSlots = new HeroSkillSlot[_skillSlotsNum]; len = _skillSlotsNum; for (i = 0; i < len; ++i) { skillSlots[i] = new HeroSkillSlot(); GameIDData skillInfo = new GameIDData(); skillInfo.parse(stageMonsterData.skills[i], GameIDData.Type.Skill); skillSlots[i].setData(this, skillInfo); } _aiSlotsNum = stageMonsterData.ai.Length; aiSlots = new AISlot[_aiSlotsNum]; len = _aiSlotsNum; for (i = 0; i < len; ++i) { aiSlots[i] = new AISlot(); #if UNITY_EDITOR try { #endif aiSlots[i].setData(this, GameManager.info.heroMonsterAI[stageMonsterData.ai[i]]); #if UNITY_EDITOR } catch { Debug.LogError("==== ERRORRRRRR : " + stageMonsterData.ai[i]); } #endif } } } else if (type == TYPE.NPC) { isHero = false; npcData = GameManager.info.npcData[id]; GameManager.info.npcData[id].setDataToCharacter(this); } else if (type == TYPE.EFFECT) { isHero = false; } baseInit(); damageRange = monsterData.damageRange; isBlockMonster = monsterData.isBlockMonster; initShadowAndEffectSize(); _showFirst = false; _recoveryDelay.Set(0.0f); _recoveryDelayMp.Set(0.0f); _recoveryDelaySp.Set(0.0f); _hpRecoveryDelay.Set(0.0f); //_monsterShowTime = 0.0f; invincible = false; //Log.log("monsterData.category : " + monsterData.category); action = GameManager.me.characterManager.getCharacterAction(category); action.init(this); hasAni = !(category == MonsterCategory.Category.OBJECT && ani.GetClip(DEAD) == null); _v = tf.localPosition; _v.y = 1.0f; tf.localPosition = _v; _damageMotionDuration = 1000.0f; if (monsterData.deleteMotionType == ChracterDeleteMotionType.EFFECT) { deleteMotionEffect = GameManager.info.effectData[monsterData.deleteMotionValue].clone(); if (deleteMotionEffect.type == EffectData.ResourceType.CHARACTER) { #if UNITY_EDITOR Debug.Log("deleteMotionEffect.effectChracter : " + (deleteMotionEffect.effectChracter == null)); #endif if (deleteMotionEffect.effectChracter == null) { deleteMotionEffect.effectChracter = GameManager.me.characterManager.getMonster(false, isPlayerMon, deleteMotionEffect.resource, false); if (unitData != null) { CharacterUtil.setRare(unitData.rare, deleteMotionEffect.effectChracter); } else if (isHero) { deleteMotionEffect.effectChracter.removeRareLine(); } deleteMotionEffect.effectChracter.init(null, null, monsterData.deleteMotionValue, isPlayerMon, Monster.TYPE.EFFECT); deleteMotionEffect.effectChracter.isEnabled = false; deleteMotionEffect.effectChracter.cTransform.localScale = cTransform.localScale; } } } else { deleteMotionEffect = null; } if (ani[Monster.NORMAL] != null) { state = Monster.NORMAL; } initHpBar(); initMiniMap(); saveCharacterOriginalValue(); // if(needToSetRareEffect) // { //GameManager.info.effectData[UnitData.rareEffectId[unitData.rare-1]].getEffect(cTransform.position,null,cTransform); //getParticleEffectByCharacterSize(this,null,cTransform); //particleEffect = GameManager.info.effectData[UnitData.rareEffectId[unitData.rare-1]].getParticleEffectByCharacterSize(this,null,cTransform,10000,0,0,0,0.5f); // } if (GameManager.me.stageManager.isIntro) { maxHp = 10000000; _hp = 10000000; } stat.maxHp = MathUtil.RoundToInt(maxHp); if (GameManager.info.modelData.ContainsKey(resourceId)) { useRimShader = GameManager.info.modelData[resourceId].useRimShader; } }
public void loadDebugAllUnit(string units, bool isMirrorType = false, string[] inputLines = null) { if (Application.isPlaying) { string[] lines = null; if (inputLines == null) { units = units.Trim(); lines = units.Split(new string[] { "\r\n", "\n" }, System.StringSplitOptions.None); } else { lines = inputLines; } if (lines == null) { return; } if (lines[0].StartsWith("SK")) { return; } unitData.Clear(); for (int i = 0; i < lines.Length; ++i) { if (string.IsNullOrEmpty(lines[i]) == false && lines[i].Length < 6) { if (lines[i].StartsWith("UN")) { lines[i] += "02001"; } else if (lines[i].StartsWith("EU")) { lines[i] += "06001"; } } if (string.IsNullOrEmpty(lines[i]) == false && (lines[i].StartsWith("UN") || lines[i].StartsWith("EU"))) { GameIDData gd = new GameIDData(); gd.parse(lines[i], GameIDData.Type.Unit); unitData.Add(gd); GameManager.me.effectManager.loadEffectFromUnitData(gd.unitData.id); MonsterData md = GameManager.info.monsterData[gd.unitData.resource]; GameDataManager.instance.addLoadModelData(md); } } GameManager.me.effectManager.startLoadEffects(true); GameDataManager.instance.startModelLoad(true); if (isMirrorType) { StartCoroutine(createMirror()); } else { StartCoroutine(checkUnits()); } } }
protected override void refreshData() { rankers.Clear(); _tempList.Clear(); int i, j, len; #if UNITY_EDITOR if (DebugManager.instance.useDebug) { if (GameDataManager.instance.partsInventoryList.Count < 10) { GameDataManager.instance.partsInventoryList.Clear(); foreach (KeyValuePair <string, HeroPartsData> kv in GameManager.info.heroPartsDic) { if (kv.Key.StartsWith("CH")) { if (kv.Value.type == HeroParts.WEAPON) { GameIDData gd = new GameIDData(); gd.parse(kv.Key, GameIDData.Type.Equip); GameDataManager.instance.partsInventoryList.Add(gd); } } } } } #endif _tempList.AddRange(GameDataManager.instance.partsInventoryList); sort(); len = _tempList.Count; int totalLine = (Mathf.CeilToInt((float)len / 5.0f) + 1); if (totalLine < 3) { totalLine = 3; } // int totalLine = Mathf.CeilToInt( (float)capacity /5.0f ); for (i = 0; i < totalLine; ++i) { GameIDData[] gds = new GameIDData[maxPerLine]; for (j = 0; j < maxPerLine; ++j) { if (i * maxPerLine + j < len) { gds[j] = _tempList[i * maxPerLine + j]; } else { gds[j] = null; } } rankers.Add(gds); } _tempList.Clear(); rankerLen = rankers.Count; }