Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | }
|
| | | break;
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | if (model.dungeonResult.leaderID != PlayerDatas.Instance.baseData.PlayerID)
|
| | | var realmLv = ModelCenter.Instance.GetModel<RealmModel>().cacheRealmLv;
|
| | | var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(realmLv);
|
| | | if (model.dungeonResult.leaderID != PlayerDatas.Instance.baseData.PlayerID
|
| | | || realmConfig == null || realmConfig.IsBigRealm != 1)
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | |
| | | public int runeTowerSweepBuyTimes { get; private set; }
|
| | | public int runeTowerSweepBuyPrice { get; private set; }
|
| | |
|
| | | public List<int> bossRebornTotalPoint { get; private set; }
|
| | | public List<int> bossRebornTotalPointWorldLevelNeed { get; private set; }
|
| | |
|
| | | public int teamMatchingTimeOut { get; private set; }
|
| | | public List<int> inGameDownLoadLevelCheckPoints = null;
|
| | | public List<int> inGameDownLoadTaskCheckPoints = null;
|
| | |
| | | rechargeRedpointMinLv = GetInt("FirstPayRedPoint", 2);
|
| | | runeTowerSweepBuyTimes = GetInt("RuneTowerSweepBuy");
|
| | | runeTowerSweepBuyPrice = GetInt("RuneTowerSweepBuy", 2);
|
| | | bossRebornTotalPoint = new List<int>(GetIntArray("BossRebornTotalPoint"));
|
| | | bossRebornTotalPointWorldLevelNeed = new List<int>(GetIntArray("BossRebornTotalPoint", 2));
|
| | | teamMatchingTimeOut = GetInt("TeamMatchingTimeOut");
|
| | | inGameDownLoadLevelCheckPoints = new List<int>(GetIntArray("InGameDownLoad"));
|
| | | inGameDownLoadTaskCheckPoints = new List<int>(GetIntArray("InGameDownLoad", 2));
|
| | |
| | | [SerializeField] ToggleButton m_MapLineSwitch;
|
| | | [SerializeField] Transform m_MapLineContainer;
|
| | | [SerializeField] Text m_CurrentLine;
|
| | | [SerializeField] MapLineBehaviour[] m_MapLineBehaviours;
|
| | | [SerializeField] DynamicCyclicScroll m_LinesScroll;
|
| | | [SerializeField] Button m_WorldMap;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | |
| | | m_MapLineContainer.gameObject.SetActive(true);
|
| | | m_MapLineSwitch.isOn = true;
|
| | |
|
| | | for (int i = 0; i < m_MapLineBehaviours.Length; i++)
|
| | | {
|
| | | var behaviour = m_MapLineBehaviours[i];
|
| | | if (i < _mapLines.Count)
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.Display(i, m_MapLineContainer);
|
| | | }
|
| | | else
|
| | | {
|
| | | behaviour.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | m_LinesScroll.Init(_mapLines);
|
| | | }
|
| | |
|
| | | private void CheckAchievementGuide()
|
| | |
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class MapLineBehaviour : MonoBehaviour
|
| | | public class MapLineBehaviour : ScrollItem
|
| | | {
|
| | | [SerializeField] Button m_Select;
|
| | | [SerializeField] Text m_Title;
|
| | |
|
| | | MapModel m_Model;
|
| | | MapModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<MapModel>()); } }
|
| | | MapModel model { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | |
|
| | | int lineId = 0;
|
| | | Transform m_ContainerLines;
|
| | | MapLine line;
|
| | |
|
| | | public void Display(int _lineId, Transform _parent)
|
| | | public override void Display(object _data)
|
| | | {
|
| | | lineId = _lineId;
|
| | | m_Title.text = Language.Get("line", _lineId + 1);
|
| | | m_ContainerLines = _parent;
|
| | | base.Display(_data);
|
| | |
|
| | | line = (MapLine)_data;
|
| | | m_Title.text = Language.Get("line", line.lineIndex);
|
| | | }
|
| | |
|
| | | public override void Dispose()
|
| | | {
|
| | | base.Dispose();
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | |
| | |
|
| | | private void SelectLine()
|
| | | {
|
| | | m_ContainerLines.gameObject.SetActive(false);
|
| | | model.RequestSelectedLine(lineId);
|
| | | model.RequestSelectedLine(line.lineIndex - 1);
|
| | |
|
| | | WindowCenter.Instance.Close<WorldMapWin>();
|
| | | WindowCenter.Instance.Close<LocalMapWin>();
|
| | |
| | | get { return m_Content; }
|
| | | }
|
| | |
|
| | | [SerializeField] BoundOffset m_BoundOffset;
|
| | | [SerializeField] Vector2 m_CellSize = new Vector2(100, 100);
|
| | | [SerializeField] protected BoundOffset m_BoundOffset;
|
| | | [SerializeField] protected Vector2 m_CellSize = new Vector2(100, 100);
|
| | | public Vector2 cellSize {
|
| | | get { return m_CellSize; }
|
| | | }
|
| | |
|
| | | [SerializeField] Vector2 m_Spacing;
|
| | | [SerializeField] protected Vector2 m_Spacing;
|
| | | public Vector2 spacing {
|
| | | get { return m_Spacing; }
|
| | | }
|
| | |
| | | get; set;
|
| | | }
|
| | |
|
| | | public virtual void Init<T>(List<T> _datas, bool _stepByStep = false)
|
| | | public virtual void Init<T>( List<T> _datas, bool _stepByStep = false)
|
| | | {
|
| | | if (_datas == null)
|
| | | {
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, August 14, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class DynamicCyclicScroll : CyclicScroll
|
| | | {
|
| | | [SerializeField] int m_MaxDynamicElements;
|
| | |
|
| | | public override void Init<T>(List<T> _datas, bool _stepByStep = false)
|
| | | {
|
| | | var maxCount = Mathf.Min(m_MaxDynamicElements, _datas.Count);
|
| | | var beyond = _datas.Count > m_MaxDynamicElements;
|
| | | switch (align)
|
| | | {
|
| | | case Align.Bottom:
|
| | | case Align.Top:
|
| | | var height = m_BoundOffset.top + m_BoundOffset.bottom + maxCount * m_CellSize.y + (maxCount - 1) * m_Spacing.y + (beyond ? m_CellSize.y * 0.5f : 0f);
|
| | | rectTransform.sizeDelta = rectTransform.sizeDelta.SetY(height);
|
| | | break;
|
| | | case Align.Left:
|
| | | case Align.Right:
|
| | | var width = m_BoundOffset.left + m_BoundOffset.right + maxCount * m_CellSize.x + (maxCount - 1) * m_Spacing.x + (beyond ? m_CellSize.x * 0.5f : 0f);
|
| | | rectTransform.sizeDelta = rectTransform.sizeDelta.SetX(width);
|
| | | break;
|
| | | }
|
| | |
|
| | | this.enabled = beyond;
|
| | | base.Init(_datas, _stepByStep);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0e6d0c1b00a0f8d46998042f6368a2a8 |
| | | timeCreated: 1534227370 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |