Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | |
|
| | | private void ExecuteBuildClientPackageIpaAppend()
|
| | | {
|
| | | ClientPackage.BuildPublishers(m_UserData.m_OutputPath, ApkOutputPath, publishers, false, false);
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(outputPath, ApkOutputPath, publishers, false, false);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageIpaReplace()
|
| | | {
|
| | | ClientPackage.BuildPublishers(m_UserData.m_OutputPath, ApkOutputPath, publishers, false, true);
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(outputPath, ApkOutputPath, publishers, false, true);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageApk()
|
| | | {
|
| | | ClientPackage.BuildPublishers(m_UserData.m_OutputPath, ApkOutputPath, publishers, false, false);
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(outputPath, ApkOutputPath, publishers, false, false);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageDevelopApk()
|
| | | {
|
| | | ClientPackage.BuildPublishers(m_UserData.m_OutputPath, ApkOutputPath, publishers, true, false);
|
| | | var outputPath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.BuildPublishers(outputPath, ApkOutputPath, publishers, true, false);
|
| | | }
|
| | |
|
| | | private static void DirectoryCopy(string sourceDirName, string destDirName)
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, June 28, 2018 |
| | | // [ Date ]: Friday, August 10, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int UnLockHole { get ; private set ; }
|
| | | public int UnLockCompose { get ; private set ; }
|
| | | public int RuneDrop { get ; private set ; }
|
| | | public int Fixed { get ; private set ; }
|
| | | |
| | | public override string getKey()
|
| | | {
|
| | |
| | | UnLockCompose=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
|
| | |
|
| | | RuneDrop=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0;
|
| | | |
| | | Fixed=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: eb8552f7e3b6ad843878daecebc9eb01 |
| | | timeCreated: 1530190652 |
| | | timeCreated: 1533871891 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent += OnComposeAnswer;
|
| | | UIEventTrigger.Get(helpBtn.gameObject).OnDown = OnClickHelpBtn;
|
| | | UIEventTrigger.Get(helpBtn.gameObject).OnUp = OnDownUp;
|
| | | selectModel.haveSelectItemRefresh += RefreshComposeSuccessRate;
|
| | | successRate = 0;
|
| | | composeWinModel.funcType = ComposeFuncType.Equip;
|
| | | firstTypeDict = composeWinModel.GetFirstTypeModel();
|
| | |
| | | {
|
| | | selectModel.selectEquipEvent -= RefreshSelectItem;
|
| | | DTCA814_tagMCMakeItemAnswer.MakeItemAnswerEvent -= OnComposeAnswer;
|
| | | selectModel.haveSelectItemRefresh -= RefreshComposeSuccessRate;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | if (preThirdType != curThirdType)
|
| | | {
|
| | | preThirdType = curThirdType;
|
| | | curComposeEquipIndex = -1;
|
| | | }
|
| | | curComposeEquipIndex = -1;
|
| | | CreateCell();
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | |
| | | if (thirdTypelist == null)
|
| | | return;
|
| | |
|
| | | ChangeUIState(false, true, false);
|
| | | equipTypeLineCellCtrl.Refresh();
|
| | | int line = thirdTypelist.Count / 3;
|
| | | if(thirdTypelist.Count % 3 > 0)
|
| | | if(thirdTypelist.Count > 1)
|
| | | {
|
| | | line += 1;
|
| | | ChangeUIState(false, true, false);
|
| | | equipTypeLineCellCtrl.Refresh();
|
| | | int line = thirdTypelist.Count / 3;
|
| | | if (thirdTypelist.Count % 3 > 0)
|
| | | {
|
| | | line += 1;
|
| | | }
|
| | | int i = 0;
|
| | | for (i = 0; i < line; i++)
|
| | | {
|
| | | equipTypeLineCellCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | |
|
| | | equipTypeLineCellCtrl.Restart();
|
| | | }
|
| | | int i = 0;
|
| | | for(i = 0; i < line; i++)
|
| | | else
|
| | | {
|
| | | equipTypeLineCellCtrl.AddCell(ScrollerDataType.Header,i);
|
| | | if(thirdTypelist.Count > 0)
|
| | | {
|
| | | ItemCompoundConfig tagItemCompound = thirdTypelist[0];
|
| | | ClickEquipTypeCell(tagItemCompound, 0);
|
| | | RefreshUI(tagItemCompound);
|
| | | }
|
| | | }
|
| | |
|
| | | equipTypeLineCellCtrl.Restart();
|
| | |
|
| | | |
| | | if(curComposeEquipIndex != -1)
|
| | | {
|
| | | ItemCompoundConfig tagItemCompound = thirdTypelist[curComposeEquipIndex];
|
| | | ClickEquipTypeCell(tagItemCompound, curComposeEquipIndex);
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshEquipTypeLineCell(ScrollerDataType type, CellView cell)
|
| | |
| | | icon.SetSprite(tagChinItem.IconKey);
|
| | | bgIcon.SetItemBackGround(tagChinItem.ItemColor);
|
| | | nameText.text = GeneralConfig.Instance.equipPlaceNameDict[tagChinItem.EquipPlace];
|
| | | if (index == curComposeEquipIndex)
|
| | | {
|
| | | ClickEquipTypeCell(tagItemCompound, index);
|
| | | }
|
| | | cellBtn.RemoveAllListeners();
|
| | | cellBtn.AddListener(()=> {
|
| | | ClickEquipTypeCell(tagItemCompound,index);
|
| | |
| | |
|
| | | public void RefreshComposeSuccessRate()
|
| | | {
|
| | | Dictionary<int, ItemModel> unfixedSelectItemDict = selectModel.GetHaveUnfixedSelectItem();
|
| | | successRate = 0;
|
| | | if (unfixedSelectItemDict != null && compoundModel != null)
|
| | | if (compoundModel != null)
|
| | | {
|
| | | if (unfixedSelectItemDict.Count >= compoundModel.unfixedItemCount)
|
| | | {
|
| | | successRate = compoundModel.successRate;
|
| | |
|
| | | }
|
| | | successRate = compoundModel.successRate;
|
| | | }
|
| | | successRateText.text = Language.Get("HallowsWin_Success", StringUtility.Contact(successRate / 100, "%"));
|
| | | }
|
| | |
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | break;
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | if (model.dungeonResult.leaderID != PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | break;
|
| | | default:
|
| | | model.ExitCurrentDungeon();
|
| | | break;
|
| | |
| | | }
|
| | |
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | WindowCenter.Instance.Open<DungeonSlayerVictoryWin>();
|
| | | break;
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | WindowCenter.Instance.Open<DungeonRealmVictoryWin>();
|
| | | RealmConfig presentcfg = ConfigManager.Instance.GetTemplate<RealmConfig>(realmModel.cacheRealmLv);
|
| | | if (presentcfg != null && presentcfg.IsBigRealm == 1
|
| | | && dungeonResult.leaderID == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | RealmBossShow.Instance.Open();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonRealmVictoryWin>();
|
| | | }
|
| | | break;
|
| | | default:
|
| | | CheckOpenSpecialVictoryWin();
|
| | |
| | | private void OnPlayerDie()
|
| | | {
|
| | | CloseImmediately();
|
| | | if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
|
| | | {
|
| | |
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | void ReceiveButton()//领取奖励
|
| | |
| | |
|
| | | private void OnPlayerDie()
|
| | | {
|
| | | Close();
|
| | | CloseImmediately();
|
| | | if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | RealmConfig _cfg = ConfigManager.Instance.GetTemplate<RealmConfig>(id);
|
| | | if (_cfg != null)
|
| | | {
|
| | | return GetTextColorByItemColor(_cfg.Name, _cfg.Quality, _dict);
|
| | | var text = RichTextMgr.Inst.presentRichText;
|
| | | int colorType = 0;
|
| | | if (text != null)
|
| | | {
|
| | | colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
|
| | | }
|
| | | return UIHelper.GetRealmName(id, colorType == 1);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | switch ((SysNotifyType)type[i])
|
| | | {
|
| | | case SysNotifyType.SysFixedTip:
|
| | | case SysNotifyType.SysFixedTip1:
|
| | | case SysNotifyType.SysScrollTip:
|
| | | case SysNotifyType.SysIntervalFixedTip:
|
| | | case SysNotifyType.SysMarqueeTip:
|
| | | case SysNotifyType.SysRealmTip:
|
| | | if (!PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | continue;
|
| | | }
|
| | | break;
|
| | | }
|
| | | switch ((SysNotifyType)type[i])
|
| | | {
|
| | | case SysNotifyType.SysFixedTip:
|
| | | MessageWin.Inst.ShowFixedTip(msg, tipInfoList);
|
| | | break;
|
| | | case SysNotifyType.SysFixedTip1:
|
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class RealmBossShow : MonoBehaviour
|
| | | {
|
| | | [SerializeField, Header("特效id")] int m_EffectId = 0;
|
| | | [SerializeField, Header("隐藏场景时间")] float m_HideGroundTime = 2.02f;
|
| | | [SerializeField, Header("展示时间")] float m_DisplayTime = 15f;
|
| | | [SerializeField, Header("特效位置")] Vector3 m_EffectPosition = Vector3.zero;
|
| | |
|
| | | UI3DShowHero showHero = new UI3DShowHero();
|
| | |
|
| | | static RealmBossShow m_Instance = null;
|
| | | public static RealmBossShow Instance
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_Instance == null)
|
| | | {
|
| | | var gameObject = Instantiate(UILoader.LoadPrefab("RealmBossShow"));
|
| | | m_Instance = gameObject.GetComponent<RealmBossShow>();
|
| | | m_Instance.transform.position = new Vector3(0, 4000, 5000);
|
| | | m_Instance.name = "RealmBossShow";
|
| | | m_Instance.IsOpen = false;
|
| | | m_Instance.gameObject.SetActive(true);
|
| | | DontDestroyOnLoad(gameObject);
|
| | | }
|
| | | return m_Instance;
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | SFXController m_Effect;
|
| | | Camera showCamera;
|
| | | Transform m_HeroStage;
|
| | |
|
| | | public bool IsOpen { get; private set; }
|
| | |
|
| | | DateTime overdueTime = DateTime.Now;
|
| | | DateTime hideGroundTime = DateTime.Now;
|
| | | DateTime forceCloseTime = DateTime.Now;
|
| | |
|
| | | public void Open()
|
| | | {
|
| | | if (!WindowCenter.Instance.CheckOpen<RealmBossShowWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmBossShowWin>(true);
|
| | | }
|
| | | StartCoroutine(Co_Start());
|
| | | }
|
| | |
|
| | | IEnumerator Co_Start()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1500;
|
| | | WindowCenter.Instance.CloseImmediately<RealmBossShowWin>();
|
| | | StartBossShow();
|
| | | }
|
| | |
|
| | | void StartBossShow()
|
| | | {
|
| | | if (IsOpen)
|
| | | {
|
| | | return;
|
| | | }
|
| | | try
|
| | | {
|
| | | IsOpen = true;
|
| | | transform.localPosition = Vector3.zero;
|
| | | m_Effect = SFXPlayUtility.Instance.Play(m_EffectId, transform);
|
| | | m_Effect.duration = 0;
|
| | | m_Effect.transform.localPosition = Vector3.zero;
|
| | | LayerUtility.SetLayer(m_Effect.gameObject, LayerUtility.BossShow, true);
|
| | | showCamera = m_Effect.transform.GetComponentInChildren<Camera>();
|
| | | m_HeroStage = m_Effect.transform.Find("Animation/zhujue/guadian");
|
| | | overdueTime = DateTime.Now.AddSeconds(m_DisplayTime);
|
| | | hideGroundTime = DateTime.Now.AddSeconds(m_HideGroundTime);
|
| | | forceCloseTime = DateTime.Now.AddSeconds(m_DisplayTime + 10);
|
| | | showCamera.cullingMask = 1 << LayerUtility.GroundLayer;
|
| | | CameraUtility.AddCullingMask(showCamera, LayerUtility.DefaultLayer);
|
| | | CameraUtility.AddCullingMask(showCamera, LayerUtility.BossShow);
|
| | | showCamera.enabled = true;
|
| | | LoadHero();
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | IsOpen = false;
|
| | | ExitDungeon();
|
| | | DesignDebug.LogError(e.Message);
|
| | | return;
|
| | | }
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(false);
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = false;
|
| | |
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | StageManager.Instance.onStartStageLoadingEvent += OnStartStageLoadingEvent;
|
| | | }
|
| | |
|
| | | void LoadHero()
|
| | | {
|
| | | var _job = PlayerDatas.Instance.baseData.Job;
|
| | | #region 装备
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
|
| | | var _weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | var _wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | | _suitLevel = clothes.GetUseDataModel(30)[0];
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | var _hero = showHero.Show(_job, _clothesId, _suitLevel, _weaponId, _wingsId, _secondaryId, m_HeroStage);
|
| | | if (_hero != null)
|
| | | {
|
| | | showHero.SitDown();
|
| | | LayerUtility.SetLayer(m_HeroStage.gameObject, LayerUtility.BossShow, true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (IsOpen && DateTime.Now > overdueTime)
|
| | | {
|
| | | ExitDungeon();
|
| | | }
|
| | | if (IsOpen && DateTime.Now > forceCloseTime)
|
| | | {
|
| | | Stop();
|
| | | }
|
| | | if (IsOpen && DateTime.Now > hideGroundTime)
|
| | | {
|
| | | HideGound();
|
| | | }
|
| | | }
|
| | |
|
| | | public void HideGound()
|
| | | {
|
| | | CameraUtility.RemoveCullingMask(showCamera, LayerUtility.GroundLayer);
|
| | | CameraUtility.RemoveCullingMask(showCamera, LayerUtility.DefaultLayer);
|
| | | }
|
| | |
|
| | | void ExitDungeon()
|
| | | {
|
| | | IsOpen = false;
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | }
|
| | |
|
| | | private void OnStartStageLoadingEvent(int obj)
|
| | | {
|
| | | Stop();
|
| | | }
|
| | |
|
| | | public void Stop()
|
| | | {
|
| | | IsOpen = false;
|
| | | StageManager.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent;
|
| | | CameraController.Instance.CameraObject.gameObject.SetActive(true);
|
| | | WindowCenter.Instance.uiRoot.uicamera.enabled = true;
|
| | | WindowCenter.Instance.CloseImmediately<RealmBossShowWin>();
|
| | | showCamera.enabled = false;
|
| | | m_Effect.gameObject.SetActive(false);
|
| | | transform.localPosition = new Vector3(0, 4000, 5000);
|
| | | showHero.Dispose();
|
| | | if (m_Effect != null)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(m_Effect);
|
| | | m_Effect = null;
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2dbfe64f1499f9e47ad66776b5d7ddec |
| | | timeCreated: 1533880877 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Friday, August 10, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class RealmBossShowWin : Window
|
| | | {
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bd3875ace2b548c438ef6672e1653819 |
| | | timeCreated: 1533902258 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | }
|
| | | }
|
| | | m_SpecialProperty.DisplayColon(config.specialProperty, config.AddAttrNum[index]);
|
| | | m_HurtRemind.text = UIHelper.ReplaceNewLine(Language.Get("RealmSuppressHurt", UIHelper.GetTextColorByItemColor(config.Quality, config.Name), (float)model.realmSuppressHurt / 1000));
|
| | | m_HurtRemind.text = UIHelper.ReplaceNewLine(Language.Get("RealmSuppressHurt", UIHelper.GetRealmName(config.Lv), (float)model.realmSuppressHurt / 1000));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Text m_Floor;
|
| | |
|
| | | [SerializeField] RectTransform m_NormalContainer;
|
| | | [SerializeField] ItemBehaviour m_Essence;
|
| | | [SerializeField] RunePreviewBehaviour m_Rune;
|
| | | [SerializeField] Text m_RuneDrop;
|
| | |
|
| | | [SerializeField] RectTransform m_UnLockHoleContainer;
|
| | | [SerializeField] Text m_Current;
|
| | | [SerializeField] Text m_Next;
|
| | |
|
| | | [SerializeField] RectTransform m_UnLockRuneContainer;
|
| | | [SerializeField] RunePreviewBehaviour m_UnLockRuneType;
|
| | | [SerializeField] Text m_RuneTypeDescription;
|
| | | [SerializeField] RectTransform m_EssenceContainer;
|
| | | [SerializeField] ItemBehaviour m_Essence;
|
| | |
|
| | | RuneTowerModel runeTowerModel { get { return ModelCenter.Instance.GetModel<RuneTowerModel>(); } }
|
| | |
|
| | |
| | |
|
| | | m_Floor.text = Language.Get("RuneTower14", towerConfig.TowerName, config.FloorName);
|
| | |
|
| | | if (config.UnLockRune > 0 || config.UnLockCompose > 0)
|
| | | {
|
| | | m_NormalContainer.gameObject.SetActive(false);
|
| | | m_UnLockHoleContainer.gameObject.SetActive(false);
|
| | | m_UnLockRuneContainer.gameObject.SetActive(true);
|
| | | var isLastFloor = runeTowerModel.IsTowerLastFloor(runeTowerModel.currentFloor);
|
| | |
|
| | | if (config.UnLockRune > 0)
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.UnLockRune);
|
| | | m_RuneTypeDescription.text = Language.Get("RuneTower3", Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1)));
|
| | | m_UnLockRuneType.Display(config.UnLockRune);
|
| | | }
|
| | | else
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.UnLockCompose);
|
| | | m_RuneTypeDescription.text = Language.Get("RuneTower8", Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1)));
|
| | | m_UnLockRuneType.Display(config.UnLockCompose);
|
| | | }
|
| | | if (isLastFloor)
|
| | | {
|
| | | m_NormalContainer.gameObject.SetActive(true);
|
| | | m_UnLockHoleContainer.gameObject.SetActive(false);
|
| | | m_EssenceContainer.gameObject.SetActive(false);
|
| | |
|
| | | m_Rune.Display(config.RuneDrop);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.RuneDrop);
|
| | | m_RuneDrop.text = Language.Get("RuneTower13", UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, itemConfig.ItemName));
|
| | | }
|
| | | else if (config.Fixed == 1)
|
| | | {
|
| | | m_NormalContainer.gameObject.SetActive(true);
|
| | | m_UnLockHoleContainer.gameObject.SetActive(false);
|
| | | m_EssenceContainer.gameObject.SetActive(false);
|
| | |
|
| | | m_Rune.Display(config.RuneDrop);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.RuneDrop);
|
| | | m_RuneDrop.text = Language.Get("RuneTower23", UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, itemConfig.ItemName));
|
| | | }
|
| | | else if (config.UnLockHole > 0)
|
| | | {
|
| | | m_NormalContainer.gameObject.SetActive(false);
|
| | | m_UnLockHoleContainer.gameObject.SetActive(true);
|
| | | m_UnLockRuneContainer.gameObject.SetActive(false);
|
| | | m_EssenceContainer.gameObject.SetActive(false);
|
| | |
|
| | | var nextHole = runeTowerModel.GetAccumulativeUnLockHoleCount(runeTowerModel.currentFloor);
|
| | | var currentHole = nextHole - 1;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_NormalContainer.gameObject.SetActive(true);
|
| | | m_NormalContainer.gameObject.SetActive(false);
|
| | | m_UnLockHoleContainer.gameObject.SetActive(false);
|
| | | m_UnLockRuneContainer.gameObject.SetActive(false);
|
| | | m_EssenceContainer.gameObject.SetActive(true);
|
| | |
|
| | | m_Essence.SetItem(config.RuneDrop, 1);
|
| | |
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.RuneDrop);
|
| | | var runeType = Language.Get(StringUtility.Contact("RuneType_", itemConfig.Effect1));
|
| | |
|
| | | m_RuneDrop.text = Language.Get("RuneTower13", UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, runeType));
|
| | | m_Essence.SetItem(2106, config.RuneEssence);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool IsTowerLastFloor(int _floorId)
|
| | | {
|
| | | var index = sortedFloors.IndexOf(_floorId);
|
| | | if (sortedFloors.Count - 1 == index)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(_floorId);
|
| | | var nextConfig = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(sortedFloors[index + 1]);
|
| | | return nextConfig.TowerId > config.TowerId;
|
| | | }
|
| | | }
|
| | |
|
| | | public List<int> GetUnLockedRuneCategorys()
|
| | | {
|
| | | var categorys = new List<int>();
|
| | |
| | | return msg;
|
| | | }
|
| | |
|
| | | public static string GetRealmName(int realmLv, bool bright = false)
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<RealmConfig>(realmLv);
|
| | | if (config == null)
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | switch (config.Quality)
|
| | | {
|
| | | case 1:
|
| | | return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", config.Name, "</color>");
|
| | | case 2:
|
| | | return StringUtility.Contact("<color=#", bright ? "08d00a" : "08d00a", ">", config.Name, "</color>");
|
| | | case 3:
|
| | | return StringUtility.Contact("<color=#", bright ? "006be3" : "31cefb", ">", config.Name, "</color>");
|
| | | case 4:
|
| | | return StringUtility.Contact("<color=#", bright ? "da48d5" : "ec4bf6", ">", config.Name, "</color>");
|
| | | case 5:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff6701" : "f8983b", ">", config.Name, "</color>");
|
| | | case 6:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", config.Name, "</color>");
|
| | | case 7:
|
| | | return StringUtility.Contact("<color=#", bright ? "f6408d" : "ff7c7c", ">", config.Name, "</color>");
|
| | | case 8:
|
| | | return StringUtility.Contact("<color=#", bright ? "bb8800" : "ffde00", ">", config.Name, "</color>");
|
| | | case 9:
|
| | | return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", config.Name, "</color>");
|
| | | default:
|
| | | return config.Name;
|
| | | }
|
| | | }
|
| | |
|
| | | public static string GetTextColorByItemColor(int itemColor, string msg, bool bright = false)
|
| | | {
|
| | | switch (itemColor)
|