Merge branch 'master' into DogzDungeon
# Conflicts:
# Core/GameEngine/Model/ConfigManager.cs
1 文件已重命名
48个文件已修改
3个文件已删除
4 文件已复制
5个文件已添加
| | |
| | | private void ExcuteBuildLevels()
|
| | | {
|
| | | UpdateLevelSetting.SetAllLevelAssetBundleName();
|
| | |
|
| | | var grachicSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/GraphicsSettings.asset")[0]);
|
| | | var lightmapStripping = grachicSettings.FindProperty("m_LightmapStripping");
|
| | | lightmapStripping.intValue = 1;
|
| | | var fogStripping = grachicSettings.FindProperty("m_FogStripping");
|
| | | fogStripping.intValue = 1;
|
| | |
|
| | | grachicSettings.ApplyModifiedProperties();
|
| | |
|
| | | ExcuteBuildAsset("maps");
|
| | | }
|
| | |
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 02, 2018 |
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int LifeBarCount { get ; private set ; }
|
| | | public int NPCEffect { get ; private set ; }
|
| | | public int NPCSpeakID { get ; private set ; }
|
| | | public int ClientRealm { get ; private set ; }
|
| | | |
| | | public override string getKey()
|
| | | {
|
| | |
| | | NPCEffect=IsNumeric(rawContents[55]) ? int.Parse(rawContents[55]):0;
|
| | |
|
| | | NPCSpeakID=IsNumeric(rawContents[56]) ? int.Parse(rawContents[56]):0;
|
| | | |
| | | ClientRealm=IsNumeric(rawContents[57]) ? int.Parse(rawContents[57]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1862c84997887d142ab127719c4d5c7f |
| | | timeCreated: 1533189772 |
| | | timeCreated: 1534744183 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 02, 2018 |
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public partial class TrialExchangeConfig : ConfigBase {
|
| | |
|
| | | public int id { get ; private set ; }
|
| | | public int exchangeItemID { get ; private set ; }
|
| | | public int[] exchangeItemID;
|
| | | public int exchangeItemCount { get ; private set ; }
|
| | | public int exchangeItemIsBind { get ; private set ; }
|
| | | public int tokenId { get ; private set ; }
|
| | |
| | | {
|
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
|
| | | exchangeItemID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | string[] exchangeItemIDStringArray = rawContents[1].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | exchangeItemID = new int[exchangeItemIDStringArray.Length]; |
| | | for (int i=0;i<exchangeItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(exchangeItemIDStringArray[i],out exchangeItemID[i]); |
| | | }
|
| | |
|
| | | exchangeItemCount=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95c6c6944c394ac4381e86d9ce3006fb |
| | | timeCreated: 1533192458 |
| | | timeCreated: 1534744580 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, August 20, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | | namespace TableConfig {
|
| | |
|
| | | |
| | | public partial class TrialRewardsConfig : ConfigBase {
|
| | |
|
| | | public int id { get ; private set ; }
|
| | | public int lineId { get ; private set ; }
|
| | | public int grade { get ; private set ; }
|
| | | public int[] rewards;
|
| | |
|
| | | public override string getKey()
|
| | | {
|
| | | return id.ToString();
|
| | | }
|
| | |
|
| | | public override void Parse() {
|
| | | try
|
| | | {
|
| | | id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | lineId=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | grade=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | string[] rewardsStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewards = new int[rewardsStringArray.Length]; |
| | | for (int i=0;i<rewardsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardsStringArray[i],out rewards[i]); |
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
copy from System/Role/RolePoint.cs.meta
copy to Core/GameEngine/Model/Config/TrialRewardsConfig.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: ee2212e198950744b9c7524b9d74d042 |
| | | timeCreated: 1534748051 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | | AddAsyncTask<OrderInfoConfig>();
|
| | | AddAsyncTask<TrialExchangeConfig>();
|
| | | AddAsyncTask<DogzDungeonConfig>();
|
| | | AddAsyncTask<TrialRewardsConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.FreePoint:
|
| | | baseData.FreePoint = value;
|
| | | ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint();
|
| | | break;
|
| | | case PlayerDataRefresh.FreeSkillPoint:
|
| | | baseData.FreeSkillPoint = value;
|
| | |
| | | SettingEffectMgr.Instance.Begin();
|
| | |
|
| | | DEBUG_STEP = 4; |
| | | ModelCenter.Instance.GetModel<RolePointModel>().UpdateRedPoint(); |
| | | QuickSetting.Instance.SetQuickSetting(vNetData.Setting); |
| | | NetLinkWin.Hide(); |
| | | WindowCenter.Instance.Close<SelectRoleWin>(); |
| | |
| | | return;
|
| | | }
|
| | |
|
| | | m_HeadUpName.SetRealm(_realm);
|
| | | m_HeadUpName.SetPlayerRealm(_realm);
|
| | | }
|
| | |
|
| | | public void SwitchTitle(uint titleID)
|
| | |
| | | treasureRefineDict.Clear();
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= RefreshFuncOpenState;
|
| | | playerPack.RefreshItemCountAct -= RefreshMat;
|
| | | playerPack.ItemCntReduceAct -= RefreshDanReduce;
|
| | | playerPack.RefreshItemSumUseCntAct -= RefreshItemUsce;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= StoveUpgradAfterClose;
|
| | |
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | | playerPack.RefreshItemCountAct += RefreshMat;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += RefreshFuncOpenState;
|
| | | playerPack.RefreshItemSumUseCntAct += RefreshItemUsce;
|
| | | WindowCenter.Instance.windowAfterCloseEvent += StoveUpgradAfterClose;
|
| | | playerPack.ItemCntReduceAct += RefreshDanReduce;
|
| | | }
|
| | |
|
| | | private void RefreshFuncOpenState(int funcId)
|
| | |
| | | /// 得到服务端的炼丹炉数据
|
| | | /// </summary>
|
| | | private int _stovelv = 1;
|
| | | private int preStoveLv = 1;
|
| | | public int StoveLV { get { return _stovelv; } } // 炼丹炉等级
|
| | | private int _stoveExp = 0;
|
| | | public int StoveExp { get { return _stoveExp; } } // 炼丹炉经验
|
| | | public int addExp = 0;
|
| | | public event Action RefreshStoveModelEvent;
|
| | | public int makerItemID { get; private set; }
|
| | |
|
| | | public bool StoveIsUpGrade { get; private set; }
|
| | | public void RefreshBlastFurnaceModel(HA3BF_tagMCPlayerStoveMsg data)
|
| | | {
|
| | | DebugEx.Log("RefreshBlastFurnaceModel");
|
| | |
| | | if(!isFirstGet)
|
| | | {
|
| | | isMakeDan = true;
|
| | | if(preStoveLv < data.StoveLV)
|
| | | {
|
| | | preStoveLv = data.StoveLV;
|
| | | StoveIsUpGrade = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | preStoveLv = data.StoveLV;
|
| | | StoveIsUpGrade = false;
|
| | | }
|
| | | PlayRecycleGuid();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if(makerItemID == 0 && addExp > 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("RecyclingElixir", addExp);
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 判断炼丹炉是否升级
|
| | | /// </summary>
|
| | | private int preStoveLv = 1;
|
| | | public bool IsUpgrade(int stoveLv)
|
| | | {
|
| | | if (preStoveLv >= stoveLv)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | else
|
| | | {
|
| | | preStoveLv = stoveLv;
|
| | | return true;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | CheckMakerDandrugCondition();
|
| | | CheckRecycleStoreRed();
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BlastFurnace)) return;
|
| | |
|
| | | List<ItemModel> itemModels = GetRecycleDanlist();
|
| | | if(itemModels != null && itemModels.Count > 0)
|
| | | if(IsRecycleDanDrug())
|
| | | {
|
| | | recycleBtnRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | |
| | | {
|
| | | recycleBtnRedpoint.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsRecycleDanDrug()
|
| | | {
|
| | | List<ItemModel> itemModels = GetRecycleDanlist();
|
| | | if(itemModels != null && itemModels.Count > 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | |
|
| | | private void StoveUpgradAfterClose(Window win)
|
| | | {
|
| | | if (win.name != "StoveUpgradWin") return;
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | |
|
| | |
|
| | | private void RefreshDanReduce(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptItem || !playerPack.CheckIsDrugById(id)) return;
|
| | | StoveIsUpGrade = false;
|
| | | PlayRecycleGuid();
|
| | | }
|
| | |
|
| | | public void PlayRecycleGuid()
|
| | | {
|
| | | if (IsRecycleDanDrug() |
| | | && !NewBieCenter.Instance.completeGuidesBuf.Contains(93)
|
| | | && !StoveIsUpGrade)
|
| | | {
|
| | | NewBieCenter.Instance.StartNewBieGuide(93);
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | _expValueText.text = Language.Get("L1055");
|
| | | }
|
| | | RefreshVirtualFill(_addExp);
|
| | | if (FurnaceModel.IsUpgrade(FurnaceModel.StoveLV))
|
| | | if (FurnaceModel.StoveIsUpGrade)
|
| | | {
|
| | | ActivateShow.StoveUpgrade(FurnaceModel.StoveLV);
|
| | | CreateCell();
|
| | |
| | | [SerializeField] Image m_BossRealm;
|
| | | [SerializeField] Text m_BossName;
|
| | |
|
| | | [SerializeField]
|
| | | ItemBehaviour[] m_RewardBehaviours;
|
| | | [SerializeField] TrialRewardsBehaviour[] m_RewardBehaviours;
|
| | | [SerializeField] ScrollRect m_RewardScroller;
|
| | |
|
| | | DungeonModel m_Model;
|
| | | DungeonModel model {
|
| | |
| | | }
|
| | |
|
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | |
|
| | | TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (npcConfig != null)
|
| | | {
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
|
| | | if (realmConfig != null)
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_BossRealm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_BossName.text = npcConfig.charName;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void DrawRewards()
|
| | | {
|
| | | m_RewardScroller.verticalNormalizedPosition = 1;
|
| | | var dongeonId = model.DungeonMap(model.selectedTrialDungeon);
|
| | | var config = ConfigManager.Instance.GetTemplate<DungeonConfig>(dongeonId);
|
| | | var rewards = config.Rewards;
|
| | | for (int i = 0; i < m_RewardBehaviours.Length; i++)
|
| | | {
|
| | | var behaviour = m_RewardBehaviours[i];
|
| | | if (i < rewards.Length)
|
| | | int[] rewards = null;
|
| | | if (trialDungeonModel.TryGetTrialRewards(config.LineID, m_RewardBehaviours[i].grade, out rewards))
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.SetItem(rewards[i], 0);
|
| | | behaviour.Display(rewards);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | {
|
| | | Dictionary<int, List<TrialExchangeConfig>> trialTokenExchangeDict = new Dictionary<int, List<TrialExchangeConfig>>();
|
| | | Dictionary<int, int> lineToTokenClassDict;
|
| | | Dictionary<int, Dictionary<int, int[]>> trialRewardDict = new Dictionary<int, Dictionary<int, int[]>>();
|
| | | public Dictionary<int, List<int>> trialClassTokens = new Dictionary<int, List<int>>();
|
| | | public List<int> trialTokens = new List<int>();
|
| | | PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
| | | }
|
| | | var funcConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("LineToItemStage");
|
| | | lineToTokenClassDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical1);
|
| | |
|
| | | var trialRewards = ConfigManager.Instance.GetAllValues<TrialRewardsConfig>();
|
| | | for (int i = 0; i < trialRewards.Count; i++)
|
| | | {
|
| | | Dictionary<int, int[]> dict = null;
|
| | | if (!trialRewardDict.TryGetValue(trialRewards[i].lineId, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, int[]>();
|
| | | trialRewardDict.Add(trialRewards[i].lineId, dict);
|
| | | }
|
| | | dict.Add(trialRewards[i].grade, trialRewards[i].rewards);
|
| | | }
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | public bool TryGetTrialExchanges(int lv, out List<TrialExchangeConfig> list)
|
| | | {
|
| | | return trialTokenExchangeDict.TryGetValue(lv, out list);
|
| | | }
|
| | |
|
| | | public bool TryGetTrialRewards(int lineId, int grade, out int[] rewards)
|
| | | {
|
| | | rewards = null;
|
| | | if (trialRewardDict.ContainsKey(lineId))
|
| | | {
|
| | | if (trialRewardDict[lineId].ContainsKey(grade))
|
| | | {
|
| | | rewards = trialRewardDict[lineId][grade];
|
| | | return rewards != null && rewards.Length > 0;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public List<int> GetTotalClass()
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetExchangeItemByJob(TrialExchangeConfig config)
|
| | | {
|
| | | if (config == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | if (config.exchangeItemID.Length == 1)
|
| | | {
|
| | | return config.exchangeItemID[0];
|
| | | }
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | if (job - 1 < config.exchangeItemID.Length && job - 1 >= 0)
|
| | | {
|
| | | return config.exchangeItemID[job - 1];
|
| | | }
|
| | | return config.exchangeItemID[0];
|
| | | }
|
| | |
|
| | | #region 红点
|
| | | void UpdateRedpoint()
|
| | | {
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(config));
|
| | | if (exchangeItemConfig.EquipPlace == 0)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | if (EquipCompare(config.exchangeItemID) == 1)
|
| | | if (EquipCompare(GetExchangeItemByJob(config)) == 1)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(list[i].exchangeItemID);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(GetExchangeItemByJob(list[i]));
|
| | | if (SatisfyExchangeBetter(list[i].id) && itemConfig.EquipPlace != 0)
|
| | | {
|
| | | _id = list[i].id;
|
| | |
| | | }
|
| | | m_Item.cellBtn.RemoveAllListeners();
|
| | | m_Item.gameObject.SetActive(true);
|
| | | ItemCellModel cellModel = new ItemCellModel(config.exchangeItemID, true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
|
| | | ItemCellModel cellModel = new ItemCellModel(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, config.exchangeItemIsBind);
|
| | | m_Item.Init(cellModel);
|
| | | m_Item.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData itemAttrData = new ItemAttrData(config.exchangeItemID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ItemAttrData itemAttrData = new ItemAttrData(model.GetExchangeItemByJob(config), true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind, true);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
|
| | | });
|
| | | m_Description.text = config.description;
|
| | | m_Token.SetItem(config.tokenId, config.tokenCount);
|
| | | var count = model.GetTrialTokenCount(config.tokenId);
|
| | | m_Token.count.color = UIHelper.GetUIColor(count >= config.tokenCount ? TextColType.Green : TextColType.NavyBrown, true);
|
| | | var equipCompare = model.EquipCompare(config.exchangeItemID);
|
| | | var equipCompare = model.EquipCompare(model.GetExchangeItemByJob(config));
|
| | | m_Up.gameObject.SetActive(equipCompare == 1);
|
| | | m_Down.gameObject.SetActive(equipCompare == -1);
|
| | |
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(config.exchangeItemID);
|
| | | var exchangeItemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(model.GetExchangeItemByJob(config));
|
| | | m_Redpoint.gameObject.SetActive(count >= config.tokenCount && (equipBetter || exchangeItemConfig.EquipPlace == 0));
|
| | | }
|
| | | }
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class TrialRewardsBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] int m_Grade;
|
| | | [SerializeField] ItemBehaviour[] m_ItemBehaviours;
|
| | |
|
| | | public int grade { get { return m_Grade; } }
|
| | |
|
| | | public void Display(int[] rewards)
|
| | | {
|
| | | for (int i = 0; i < m_ItemBehaviours.Length; i++)
|
| | | {
|
| | | var behaviour = m_ItemBehaviours[i];
|
| | | if (i < rewards.Length)
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.SetItem(rewards[i], 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | behaviour.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Dungeon/TrialRewardsBehaviour.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | licenseType: Free |
| | | guid: f436f3dabd50bc5429d2de289d60fdd5 |
| | | timeCreated: 1534749125 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<BossHomeConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV,npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | |
|
| | | m_Participant.gameObject.SetActive(isUnLocked && findPreciousModel.IsBossAlive(bossId));
|
| | |
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossRebornCoolDown(isUnLocked);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossParticipant(bossId);
|
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<ElderGodAreaConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | |
|
| | | if (m_Realm != null)
|
| | | {
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | |
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | |
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<PersonalBossConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | UpdateBossRebornCoolDown(true);
|
| | | OnSelected(bossId);
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<WorldBossConfig>(bossId);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(bossId);
|
| | |
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.Realm);
|
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm);
|
| | | UpdateBossRebornCoolDown(isUnLocked);
|
| | | UpdateBossPortrait(interactorableState);
|
| | | OnSelected(bossId);
|
| | |
| | | }
|
| | |
|
| | | #region 发送穿戴装备的请求
|
| | | RolePointModel _rolePointModel;
|
| | | RolePointModel rolePointModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>());
|
| | | }
|
| | | }
|
| | | ItemConfig sendItemConfig = null;
|
| | | ItemModel sendItemModel = null;
|
| | | int itemIndex = -1;
|
| | |
| | | foreach (var key in sumOffsetlist.Keys)
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshFreePoint;
|
| | | rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
|
| | | //rolePointModel.SendAddPoint((int)key, (int)sumOffsetlist[key]);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } |
| | | } |
| | | |
| | | RolePointModel _rolePointModel; |
| | | RolePointModel rolePointModel |
| | | { |
| | | get |
| | | { |
| | | return _rolePointModel ?? (_rolePointModel = ModelCenter.Instance.GetModel<RolePointModel>()); |
| | | } |
| | | } |
| | | |
| | | public static ItemModel itemModel = null; |
| | | private ItemConfig itemConfig = null; |
| | | private AttrEnum selectAttr = AttrEnum.POWER; |
| | |
| | | |
| | | private void RefreshWashAttrDes() |
| | | { |
| | | float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr]; |
| | | switch (selectAttr) |
| | | { |
| | | case AttrEnum.POWER: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint; |
| | | break; |
| | | case AttrEnum.AGILITY: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint; |
| | | break; |
| | | case AttrEnum.PHYSIQUE: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint; |
| | | break; |
| | | case AttrEnum.MENTALITY: |
| | | washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint; |
| | | break; |
| | | } |
| | | //float initPoint = rolePointModel.GetPointCreate(PlayerDatas.Instance.baseData.Job)[(int)selectAttr];
|
| | | //switch (selectAttr)
|
| | | //{
|
| | | // case AttrEnum.POWER:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseSTR) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.AGILITY:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePHY) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.PHYSIQUE:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BaseCON) - initPoint;
|
| | | // break;
|
| | | // case AttrEnum.MENTALITY:
|
| | | // washPoint = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataRefresh.BasePNE) - initPoint;
|
| | | // break;
|
| | | //}
|
| | | |
| | | PlayerPropertyConfig propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>((int)selectAttr); |
| | | washAttrDesText.text = Language.Get("BagWin_Washpoint2", propertyConfig.Name, UIHelper.GetPropertyMapPlayerData(selectAttr), washPoint); |
| | |
| | | RedEnvelopeModel.RedEnvelope _envelope;
|
| | | if (envelopeModel.TryGetLatestEnvelope(out _envelope))
|
| | | {
|
| | | if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.Simple)
|
| | | if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2;
|
| | |
| | | bool IsBool = false;
|
| | | var State1 = RedpointCenter.Instance.GetRedpointState(201);//福利
|
| | | var State2 = RedpointCenter.Instance.GetRedpointState(210);
|
| | | if (State1 == RedPointState.Simple || State2 == RedPointState.Simple)
|
| | | if (State1 == RedPointState.Simple || State1 == RedPointState.GetReward || State2 == RedPointState.Simple)
|
| | | {
|
| | | IsBool = true;
|
| | | }
|
| | |
| | | var _complete = _playerData.value >= (_cfg as OSCBillTagAwardConfig).Condition;
|
| | | if (_complete)
|
| | | {
|
| | | _redpoint.state = RedPointState.Simple;
|
| | | _redpoint.state = RedPointState.GetReward;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | if (_rank != -1 && _rank >= _start
|
| | | && _rank <= _end && !_playerData.billAwardGet)
|
| | | {
|
| | | _redpoint.state = RedPointState.Simple;
|
| | | _redpoint.state = RedPointState.GetReward;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | foreach (var _key in m_Redpoints.Keys)
|
| | | {
|
| | | if (m_Redpoints[_key].state == RedPointState.Simple)
|
| | | if (m_Redpoints[_key].state == RedPointState.GetReward
|
| | | || m_Redpoints[_key].state == RedPointState.Simple)
|
| | | {
|
| | | return _key;
|
| | | }
|
| | |
| | | {
|
| | | foreach (var _key in m_Redpoints.Keys)
|
| | | {
|
| | | if (m_Redpoints[_key].state == RedPointState.Simple)
|
| | | if (m_Redpoints[_key].state == RedPointState.GetReward
|
| | | || m_Redpoints[_key].state == RedPointState.Simple)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
| | | }
|
| | | if (Bool)
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | redPointStre1.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void UpdateRedpackRedpoint(bool _checkVoice = false)
|
| | | {
|
| | | bool hasRed = m_OpenServerGetRedpin.state == RedPointState.Simple;
|
| | | bool hasRed = m_OpenServerGetRedpin.state == RedPointState.GetReward;
|
| | | m_OpenServerGetRedpin.state = RedPointState.None;
|
| | | if (CanGetEnvelope())
|
| | | {
|
| | | m_OpenServerGetRedpin.state = RedPointState.Simple;
|
| | | m_OpenServerGetRedpin.state = RedPointState.GetReward;
|
| | | if (_checkVoice && !hasRed && servereInited && HasOtherRedpack() && !HasSelfRedpack())
|
| | | {
|
| | | CheckRedEnvelopeVoice();
|
| | |
| | | get
|
| | | {
|
| | | return m_RedAchieveRedpoint.state == RedPointState.Simple
|
| | | || m_OpenServerGetRedpin.state == RedPointState.Simple;
|
| | | || m_OpenServerGetRedpin.state == RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [SerializeField] Image baseImg;
|
| | | [SerializeField] Image specialImg;
|
| | | [SerializeField] Image addImg;
|
| | | [SerializeField] Button addBtn;
|
| | |
|
| | | [SerializeField] Text m_BaseTxt;
|
| | | [SerializeField] Text m_SpecialTxt;
|
| | | [SerializeField] Text m_AddTxt;
|
| | |
|
| | | private readonly Color selectTxtCol = new Color32(52, 7, 1, 255);
|
| | | private readonly Color unSelectTxtCol = new Color32(125, 91, 52, 255);
|
| | |
| | |
|
| | | [SerializeField] Text descText;
|
| | |
|
| | | private void OnAddBtn()
|
| | | {
|
| | | if (attrShowType == 3) return;
|
| | | attrShowType = 3;
|
| | |
|
| | | addImg.SetSprite("2LVSelectTab_b");
|
| | | specialImg.SetSprite("2LVUnSelectTab_b");
|
| | | baseImg.SetSprite("2LVUnSelectTab_b");
|
| | | m_BaseTxt.color = unSelectTxtCol;
|
| | | m_SpecialTxt.color = unSelectTxtCol;
|
| | | m_AddTxt.color = selectTxtCol;
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
|
| | | private void OnSpecialBtn()
|
| | | {
|
| | | if (attrShowType == 2) return;
|
| | | attrShowType = 2;
|
| | |
|
| | | addImg.SetSprite("2LVUnSelectTab_b");
|
| | | specialImg.SetSprite("2LVSelectTab_b");
|
| | | baseImg.SetSprite("2LVUnSelectTab_b");
|
| | | m_BaseTxt.color = unSelectTxtCol;
|
| | | m_SpecialTxt.color = selectTxtCol;
|
| | | m_AddTxt.color = unSelectTxtCol;
|
| | |
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
| | | if (attrShowType == 1) return;
|
| | | attrShowType = 1;
|
| | |
|
| | | addImg.SetSprite("2LVUnSelectTab_b");
|
| | | specialImg.SetSprite("2LVUnSelectTab_b");
|
| | | baseImg.SetSprite("2LVSelectTab_b");
|
| | | m_BaseTxt.color = selectTxtCol;
|
| | | m_SpecialTxt.color = unSelectTxtCol;
|
| | | m_AddTxt.color = unSelectTxtCol;
|
| | |
|
| | | OnRefreshScroll();
|
| | | }
|
| | |
| | | {
|
| | | m_Controller.OnRefreshCell += OnRefreshCell;
|
| | | m_Controller.OnGetDynamicSize += OnGetDynamicSize;
|
| | | addBtn.onClick.AddListener(OnAddBtn);
|
| | | specialBtn.onClick.AddListener(OnSpecialBtn);
|
| | | baseBtn.onClick.AddListener(OnBaseBtn);
|
| | | closeBtn.onClick.AddListener(OnClose);
|
| | |
| | | [SerializeField] RectTransform m_ContainerExp;
|
| | | [SerializeField] Slider m_ExpSlider;
|
| | | [SerializeField] Text m_WorldExp;
|
| | | [SerializeField] Button m_PromoteBtn;
|
| | | [SerializeField] Button m_PlayerPropertyBtn;
|
| | | [SerializeField] Button m_TitleBtn;
|
| | | [SerializeField] Button m_RenameBtn;
|
| | |
| | | {
|
| | | WindowCenter.Instance.Open<RoleAttrWin>();
|
| | | }
|
| | | private void OnPromoteClick()
|
| | | {
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
|
| | | {
|
| | | WindowCenter.Instance.Open<RolePoint>();
|
| | | }
|
| | | else
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
|
| | | }
|
| | | }
|
| | | //private void OnPromoteClick()
|
| | | //{
|
| | | // if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.AddPoint))
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RolePoint>();
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // FuncOpen.Instance.ProcessorFuncErrorTip((int)FuncOpenEnum.AddPoint);
|
| | | // }
|
| | | //}
|
| | | private void OnRefreshPlayerInfo(PlayerDataRefresh refreshType)
|
| | | {
|
| | | switch (refreshType)
|
| | |
| | | functionButtonMagician.onClick.AddListener(OnFuncMagician);
|
| | | functionButtonGulu.onClick.AddListener(OnFuncGulu);
|
| | | functionButtonHorucx.onClick.AddListener(OnFuncHorucx);
|
| | | m_PromoteBtn.onClick.AddListener(OnPromoteClick);
|
| | | //m_PromoteBtn.onClick.AddListener(OnPromoteClick);
|
| | | m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
|
| | | m_TitleBtn.onClick.AddListener(OnDesignationClick);
|
| | | m_RenameBtn.onClick.AddListener(OnRenameClick);
|
| | |
| | | #endregion
|
| | |
|
| | | #region 主界面提升
|
| | | RolePointModel rolePointModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<RolePointModel>(); }
|
| | | }
|
| | |
|
| | | PlayerMethodData methodData
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<PlayerMethodData>(); }
|
| | |
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | | {
|
| | | if (_id == rolePointModel.addPointRedpoint.id ||
|
| | | _id == strengthengmodel.StrengthRedpoint.id ||
|
| | | if (_id == strengthengmodel.StrengthRedpoint.id ||
|
| | | _id == MainRedDot.RedPoint_MountPackKey ||
|
| | | _id == MainRedDot.Instance.redPonintPetFunc2.id ||
|
| | | _id == MainRedDot.Instance.redPointWashFunc.id ||
|
| | |
| | | {
|
| | | case PromoteDetailType.BetterEquip:
|
| | | return modelInterface.CheckBetterEquip(RoleEquipType.retSpiritAnimal);
|
| | | case PromoteDetailType.AddPoint:
|
| | | return ModelCenter.Instance.GetModel<RolePointModel>().addPointRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.EquipStrength:
|
| | | return strengthengmodel.StrengthRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.Mount:
|
| | |
| | | public enum PromoteDetailType
|
| | | {
|
| | | BetterEquip,
|
| | | AddPoint,
|
| | | EquipStrength,
|
| | | Mount,
|
| | | Pet,
|
| | |
| | | {
|
| | | var towerFloorConfig = ConfigManager.Instance.GetTemplate<RuneTowerFloorConfig>(model.selectedFloor);
|
| | | var npcConfig = ConfigManager.Instance.GetTemplate<NPCConfig>(towerFloorConfig.BossId);
|
| | | if (npcConfig.Realm > 0)
|
| | |
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm))
|
| | | {
|
| | | m_BossRealm.gameObject.SetActive(true);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm);
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm);
|
| | | m_BossRealm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | else
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | //神兽强化;列表条目
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class GodBeastEntry : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell m_itemCell; |
| | | [SerializeField] GameObject m_Selectedbar_Image; |
| | | [SerializeField] Text m_Item_Text; |
| | | //[SerializeField] Button // |
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | public void GetGodBeastLocationMarker(int locationMarker)
|
| | | {
|
| | | int godBeastNumber = locationMarker / 10;
|
| | | int godBeastPart = locationMarker % 10;
|
| | | List<ItemModel> itemModel = dogz_model.GetDogzEquips(godBeastNumber);
|
| | | if (itemModel != null)
|
| | | {
|
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | if (itemModel[i].EquipPlace == godBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 1);
|
| | | m_itemCell.Init(ItemModel);
|
| | | var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemModel[i].itemId);
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor); |
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| File was renamed from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: ce0013549955f054e978142d01217a31 |
| | | timeCreated: 1534423338 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | | //神兽强化
|
| | | namespace Snxxz.UI
|
| | | { |
| | | public class GodBeastClass
|
| | | {
|
| | | public int GodBeastNumber;//神兽编号
|
| | | public int GodBeastPart;//神兽部位
|
| | | public int GodBeastLv;//神兽等级
|
| | | public int GodBeasProficiency;//熟练度
|
| | | public int GodBeastQuality;//神兽品质
|
| | | public int GodBeastStar;//神兽星级
|
| | | public int LocationMarker;//位置标记
|
| | | } |
| | | public class GodBeastReinforcementWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController; |
| | | [SerializeField] GodBeastSlidingList m_GodBeastSlidingList; |
| | | [SerializeField] GameObject m_Listprompt_Text;
|
| | |
|
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | private List<GodBeastClass> GodBeastList = new List<GodBeastClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | GetGodBeast();//获取神兽强化装备信息
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | if (GodBeastList.Count > 0)
|
| | | {
|
| | | m_ScrollerController.JumpIndex(0);
|
| | | } |
| | | m_GodBeastSlidingList.Init(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | |
| | | private void GetGodBeast()//存储神兽强化列表数据和排序
|
| | | {
|
| | | GodBeastList.Clear();
|
| | | var DogzEquipDict = dogz_model.dogzAssistStateDict;
|
| | | foreach (var key in DogzEquipDict.Keys)
|
| | | {
|
| | | if (DogzEquipDict[key] == 1)
|
| | | {
|
| | | GodBeastClass godBeastClass = new GodBeastClass();
|
| | | List<ItemModel> itemModel = dogz_model.GetDogzEquips(key);
|
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | godBeastClass.GodBeastNumber = key;
|
| | | godBeastClass.GodBeastPart = itemModel[i].EquipPlace;
|
| | | godBeastClass.GodBeastQuality = itemModel[i].chinItemModel.ItemColor;
|
| | | godBeastClass.GodBeastStar = itemModel[i].chinItemModel.StarLevel;
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | | godBeastClass.GodBeastLv = IudetDogzEquipPlus[0];
|
| | | godBeastClass.GodBeasProficiency = IudetDogzEquipPlus[1];
|
| | | godBeastClass.LocationMarker= key*10+ itemModel[i].EquipPlace;
|
| | | GodBeastList.Add(godBeastClass);
|
| | | }
|
| | | }
|
| | | }
|
| | | GodBeastList.Sort(Compare);
|
| | | }
|
| | | int Compare(GodBeastClass x, GodBeastClass y)
|
| | | {
|
| | | if (x.GodBeastQuality.CompareTo(y.GodBeastQuality) != 0)//品质
|
| | | {
|
| | | return -x.GodBeastQuality.CompareTo(y.GodBeastQuality);
|
| | | }
|
| | | if (x.GodBeastStar.CompareTo(y.GodBeastStar) != 0)//星级
|
| | | {
|
| | | return -x.GodBeastStar.CompareTo(y.GodBeastStar);
|
| | | }
|
| | | if (x.GodBeastPart.CompareTo(y.GodBeastPart) != 0)//装备位
|
| | | {
|
| | | return x.GodBeastPart.CompareTo(y.GodBeastPart);
|
| | | }
|
| | | if (x.GodBeastLv.CompareTo(y.GodBeastLv) != 0)//强化等级
|
| | | {
|
| | | return -x.GodBeastLv.CompareTo(y.GodBeastLv);
|
| | | }
|
| | | if (x.GodBeasProficiency.CompareTo(y.GodBeasProficiency) != 0)//熟练度
|
| | | {
|
| | | return -x.GodBeasProficiency.CompareTo(y.GodBeasProficiency);
|
| | | }
|
| | | return 1;
|
| | | } |
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | if (GodBeastList.Count > 0)
|
| | | {
|
| | | m_Listprompt_Text.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Listprompt_Text.SetActive(true);
|
| | | }
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | | {
|
| | | int locationMarker = GodBeastList[i].LocationMarker;
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, locationMarker);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | |
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | GodBeastEntry godBeastEntry = cell.GetComponent<GodBeastEntry>();
|
| | | int locationMarker = cell.index;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastReinforcementWin.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: 69585e30fb1796b42b2b119b864f6776 |
| | | timeCreated: 1534421646 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, August 17, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | //神兽强化右侧材料吸收列表 |
| | | namespace Snxxz.UI { |
| | | |
| | | public class GodBeastSlidingList:MonoBehaviour {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | |
|
| | | [SerializeField] Text m_Label;
|
| | | [SerializeField] Button m_Arrow;
|
| | | [SerializeField] GameObject m_ScrollViewFirst;
|
| | | [SerializeField] Button m_ButtonAll;//所有
|
| | | [SerializeField] Button m_ButtonCrystal;//水晶
|
| | | [SerializeField] Button m_ButtonBlue;//蓝
|
| | | [SerializeField] Button m_ButtonPurple;//紫色
|
| | | [SerializeField] Button m_ButtonOrange;//橙色
|
| | |
|
| | | [SerializeField] Toggle m_ToggleAll;
|
| | | public int LINE = 10;
|
| | |
|
| | | private int Quality = 10;
|
| | | private void Start()
|
| | | {
|
| | | m_Arrow.AddListener(OnClickArrow);
|
| | | m_ButtonAll.AddListener(()=>{ OnClickSwith(10); });
|
| | | m_ButtonCrystal.AddListener(() => { OnClickSwith(1);});
|
| | | m_ButtonBlue.AddListener(() => { OnClickSwith(2); });
|
| | | m_ButtonPurple.AddListener(() => { OnClickSwith(3); });
|
| | | m_ButtonOrange.AddListener(() => { OnClickSwith(4); });
|
| | | m_ToggleAll.onValueChanged.AddListener(OnClickToggle);
|
| | | } |
| | | private void OnEnable()
|
| | | {
|
| | | |
| | | } |
| | | private void OnDisable()
|
| | | {
|
| | | |
| | | } |
| | | |
| | | public void Init()
|
| | | {
|
| | | Quality = 10;
|
| | | ContentSelect(Quality);
|
| | | if (m_ScrollViewFirst.activeSelf)
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(false);
|
| | | }
|
| | | if (m_ToggleAll.isOn)
|
| | | {
|
| | | m_ToggleAll.isOn = false;
|
| | | }
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | |
|
| | | } |
| | | |
| | | public void Unit()
|
| | | {
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
|
| | | }
|
| | |
|
| | | private void OnClickArrow()
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(!m_ScrollViewFirst.activeSelf);
|
| | | }
|
| | |
|
| | | private void OnClickToggle(bool IsBool)
|
| | | {
|
| | |
|
| | | }
|
| | | private void OnClickSwith(int Type)
|
| | | {
|
| | | Quality = Type;
|
| | | if (m_ScrollViewFirst.activeSelf)
|
| | | {
|
| | | m_ScrollViewFirst.SetActive(false);
|
| | | }
|
| | | ContentSelect(Quality);
|
| | | }
|
| | | private void ContentSelect(int Type)
|
| | | {
|
| | | switch (Type)
|
| | | {
|
| | | case 1:
|
| | | m_Label.text = "强化水晶";
|
| | | break;
|
| | | case 2:
|
| | | m_Label.text = "蓝色以下";
|
| | | break;
|
| | | case 3:
|
| | | m_Label.text = "紫色以下";
|
| | | break;
|
| | | case 4:
|
| | | m_Label.text = "橙色以下";
|
| | | break;
|
| | | case 10:
|
| | | m_Label.text = "全部";
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | int code = 0;
|
| | | for (code = 0; code < LINE; code++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, code);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int gridlineIndex = cell.index;
|
| | | int childCode = 0;
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | | ChildNodes _ChildNodes = cell.transform.GetChild(childCode).GetComponent<ChildNodes>();
|
| | | _ChildNodes._ItemIcon.SetActive(false);
|
| | | _ChildNodes._Elect.SetActive(false);
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | if (cellCount - 1 < 1)
|
| | | {
|
| | |
|
| | |
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
copy from System/Role/RolePoint.cs.meta
copy to System/Strengthening/GodBeastSlidingList.cs.meta
| File was copied from System/Role/RolePoint.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 77a6a757b99422846bb5b68b65b5af18 |
| | | timeCreated: 1502422861 |
| | | guid: e770376f004aa1143bcd9613fa087f12 |
| | | timeCreated: 1534485389 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | case RolePromoteModel.PromoteDetailType.BetterEquip:
|
| | | WindowCenter.Instance.Open<KnapSackWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.AddPoint:
|
| | | WindowCenter.Instance.Open<RolePoint>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.EquipStrength:
|
| | | WindowCenter.Instance.Open<EquipReinforceWin>();
|
| | | break;
|
| | |
| | | m_FunctionIcon.SetSprite(skillConfig.IconName);
|
| | | originalScale = 1f;
|
| | | break;
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(m_Id, m_TreasureIcon);
|
| | | originalScale = 9f;
|
| | | break;
|
| | | }
|
| | |
|
| | | this.transform.localScale = Vector3.one * originalScale;
|
| | |
| | | {
|
| | | case FunctionUnlockType.Treasure:
|
| | | case FunctionUnlockType.TreasureSkill:
|
| | | case FunctionUnlockType.TreasureFunc:
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | break;
|
| | | case FunctionUnlockType.Normal:
|
| | |
| | | var id = achievements[i];
|
| | | Achievement achievement;
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(id);
|
| | | if (config == null || PlayerDatas.Instance.baseData.LV < config.Condition3)
|
| | | {
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (model.TryGetAchievement(id, out achievement) && !achievement.completed)
|
| | | {
|
| | | return id;
|
| | |
| | |
|
| | | foreach (var achievementGroup in treasure.achievementGroups.Values)
|
| | | {
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | | Achievement doingAchievement;
|
| | | if (achievementModel.TryGetAchievement(achievementGroup.GetDoingAchievement(), out doingAchievement))
|
| | | {
|
| | | var successConfig = ConfigManager.Instance.GetTemplate<SuccessConfig>(doingAchievement.id);
|
| | | if (successConfig.Condition3 > 0 && PlayerDatas.Instance.baseData.LV < successConfig.Condition3)
|
| | | {
|
| | | treasure.achievementRedpoint.state = RedPointState.None;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (achievementGroup.IsAwardable())
|
| | | {
|
| | | treasure.achievementRedpoint.state = RedPointState.Simple;
|
| | |
| | | m_Story.text = string.Format(config.Verse[0], killNpcConfig.MaxAtk);
|
| | | }
|
| | | break;
|
| | | //case 304://签到相关配置移到功能配置表
|
| | | // var _specialData = treasure.specialData;
|
| | | // if (_specialData != null)
|
| | | // {
|
| | | // var _keyValue = _specialData.propertyDict.First();
|
| | | // var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
|
| | | // m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
|
| | | // }
|
| | | // break;
|
| | | case 304://签到相关配置移到功能配置表
|
| | | var soulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
|
| | | var _propertyDict = soulModel.signAddProperty;
|
| | | if (_propertyDict != null)
|
| | | {
|
| | | var _keyValue = _propertyDict.First();
|
| | | var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
|
| | | m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
|
| | | }
|
| | | break;
|
| | | }
|
| | | flyObject = unlockFlyObject1;
|
| | | }
|
| | |
| | | if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
|
| | | && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()
|
| | | && !NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | ActivateShow.TreasureSoulGetReward((int)_data.PriID, beforeFinishCount, special.presentFinishCount);
|
| | | }
|
| | |
| | | var instance = UIUtility.CreateWidget("TreasureUnlockFlyObject_1", "TreasureUnlockFlyObject_1");
|
| | | instance.transform.SetParentEx(m_FurnacesFlyContainer, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | flyObject = instance.GetComponent<FunctionUnlockFlyObject>();
|
| | | flyObject.SetContent(FunctionUnlockType.Treasure, 301);
|
| | | flyObject.SetContent(FunctionUnlockType.TreasureFunc, 301);
|
| | | flyObject.transform.localScale = Vector3.one * m_FurnacesScale;
|
| | | flyObject.SetScale(m_FurnacesScale);
|
| | |
|
| | |
| | | {
|
| | | get
|
| | | {
|
| | | return consumeRebateRedpoint.state == RedPointState.Simple;
|
| | | return consumeRebateRedpoint.state == RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | continue;
|
| | | }
|
| | | consumeRebateRedpoint.state = RedPointState.Simple;
|
| | | consumeRebateRedpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= _cfg.LV && !_got)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= _cfg.LV &&
|
| | | PlayerDatas.Instance.baseData.VIPLv >= _cfg.VIPLimit && !_vipGot)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (CanFreeCoinPrayer())
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.ExpPray))
|
| | |
| | | var _expRuneCnt = playerPack.GetItemCountByID(PackType.rptItem, prayerExpRune);
|
| | | if (_expRuneCnt > 0)
|
| | | {
|
| | | redpoint.state = RedPointState.Simple;
|
| | | redpoint.state = RedPointState.GetReward;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | redpoint.state = RedPointState.None;
|
| | | return;
|
| | | }
|
| | | redpoint.state = todaySign ? RedPointState.None : RedPointState.Simple;
|
| | | redpoint.state = todaySign ? RedPointState.None : RedPointState.GetReward;
|
| | | }
|
| | |
|
| | | public override void Init()
|
| | |
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | | else if (signInModel.redpoint.state == RedPointState.Simple)
|
| | | else if (signInModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 0);
|
| | |
| | | {
|
| | | functionOrder = 2;
|
| | | }
|
| | | else if (prayerModel.redpoint.state == RedPointState.Simple)
|
| | | else if (prayerModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 1);
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (levelGiftModel.redpoint.state == RedPointState.Simple)
|
| | | if (levelGiftModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 3);
|
| | |
| | | {
|
| | | functionOrder = 1;
|
| | | }
|
| | | else if (signInModel.redpoint.state == RedPointState.Simple)
|
| | | else if (signInModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | |
| | | {
|
| | | functionOrder = 2;
|
| | | }
|
| | | else if (prayerModel.redpoint.state == RedPointState.Simple)
|
| | | else if (prayerModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 1;
|
| | | }
|
| | |
| | | return 2;
|
| | | }
|
| | |
|
| | | if (levelGiftModel.redpoint.state == RedPointState.Simple)
|
| | | if (levelGiftModel.redpoint.state == RedPointState.GetReward)
|
| | | {
|
| | | return 3;
|
| | | }
|
| | |
| | |
|
| | | RegisterModel<UnionTaskModel>();
|
| | | RegisterModel<FriendsModel>();
|
| | | RegisterModel<RolePointModel>();
|
| | | RegisterModel<RoleParticularModel>();
|
| | | RegisterModel<WorldBossModel>();
|
| | | RegisterModel<RolePromoteModel>();
|
| | |
| | | SetJumpLogic<RealmWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RolePoint:
|
| | | SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.MainTask:
|
| | | PlayerTaskDatas taskDatas = ModelCenter.Instance.GetModel<PlayerTaskDatas>();
|
| | |
| | | SetJumpLogic<KnapSackWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenAddPoint:
|
| | | SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | //SetJumpLogic<RolePoint>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.RebornOpenHourse:
|
| | | SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
|
| | |
| | | m_BossName.text = npcConfig.charName; |
| | | m_BossLevel.text = _level.ToString(); |
| | | m_BossIcon.SetSprite(npcConfig.HeadPortrait); |
| | | if (npcConfig.Realm > 0) |
| | | |
| | | if (m_Realm != null) |
| | | { |
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(npcConfig.ClientRealm)) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.Realm); |
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(npcConfig.ClientRealm); |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | else |
| | | { |
| | | m_Realm.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | surplusSegments = -1; |
| | | totalSegments = npcConfig.LifeBarCount; |
| | |
| | | {
|
| | | m_PlayerName.text = _name;
|
| | | m_HangHint.gameObject.SetActive(_hang);
|
| | | SetRealm(_realm);
|
| | | SetPlayerRealm(_realm);
|
| | | SetTitle(_titleId);
|
| | | SetAlliance(_alliance);
|
| | | SyncPosition(true);
|
| | | }
|
| | |
|
| | | public void SetRealm(int _realm)
|
| | | public void SetPlayerRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(_realm > 0);
|
| | | m_PlayerName.alignment = _realm > 0 ? TextAnchor.MiddleLeft : TextAnchor.MiddleCenter;
|
| | |
|
| | | if (m_Realm)
|
| | | {
|
| | | if (_realm > 0)
|
| | | {
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetFunctionalNpcRealm(int _realm)
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | |
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public void SetNpcRealm(int _realm)
|
| | | {
|
| | | if (m_Realm != null)
|
| | | {
|
| | | if (ConfigManager.Instance.ContainKey<RealmConfig>(_realm))
|
| | | {
|
| | | m_Realm.gameObject.SetActive(true);
|
| | | m_PlayerName.alignment = TextAnchor.MiddleLeft;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm);
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | SetImageMaterialTexture(realmConfig.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PlayerName.alignment = TextAnchor.MiddleCenter;
|
| | | m_Realm.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void SetNPCName(string _name)
|
| | | {
|
| | | SetFunctionalNpcRealm(0);
|
| | | SetNpcRealm(999);
|
| | | m_PlayerName.text = _name;
|
| | | SyncPosition(true);
|
| | | }
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_id);
|
| | | if (config != null)
|
| | | {
|
| | | SetFunctionalNpcRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | findPreciousModel.bossInfoUpdateEvent -= UpdateNpcRebornTime;
|
| | | findPreciousModel.bossInfoUpdateEvent += UpdateNpcRebornTime;
|
| | | npcId = _npcId;
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = config.charName;
|
| | | }
|
| | |
|
| | |
| | | var config = ConfigManager.Instance.GetTemplate<NPCConfig>(_npcId);
|
| | | if (config != null)
|
| | | {
|
| | | SetRealm(config.Realm);
|
| | | SetNpcRealm(config.ClientRealm);
|
| | | m_PlayerName.text = StringUtility.Contact(config.charName, Language.Get("HeadUpName_Monster", _level));
|
| | | monsterLevel = _level;
|
| | | monsterType = (E_MonsterType)config.IsBoss;
|
| | |
| | | Normal = 2,
|
| | | TreasureSkill = 3,
|
| | | Skill = 4,
|
| | | TreasureFunc = 5,
|
| | | }
|
| | |
|
| | | public enum RedPointState
|