少年修仙传客户端代码仓库
client_Wu Xijin
2019-03-15 4d09b2a631b8ca9b6585790b32ddccd097f2af6c
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
5个文件已修改
181 ■■■■ 已修改文件
System/FairyAu/AllianceBossVictoryWin.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmAnimationBehaviour.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmModel.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmWin.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowJump/WindowJumpMgr.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/AllianceBossVictoryWin.cs
@@ -12,8 +12,11 @@
namespace Snxxz.UI
{
    public class AllianceBossVictoryWin : DungeonVictoryWin
    public class AllianceBossVictoryWin : Window
    {
        [SerializeField] Transform m_ContainerPoivt;
        [SerializeField] ButtonEx m_Exit;
        [SerializeField] Text m_ExitTimer;
        [SerializeField] Transform m_ContainerTopThree;
        [SerializeField] Image m_Rank;
        [SerializeField] Transform m_ContainerOutThree;
@@ -30,21 +33,94 @@
        [SerializeField] List<DemonJarRewardBehaviour> m_MyItems;
        [SerializeField] Button m_GotoAuction;
        float timer = 0f;
        AllianceBossModel model { get { return ModelCenter.Instance.GetModel<AllianceBossModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            base.AddListeners();
            m_GotoAuction.AddListener(GotoAuction);
            m_Exit.AddListener(ExitDungeon);
        }
        protected override void Display()
        protected override void OnActived()
        {
            base.OnActived();
            if (!WindowJumpMgr.Instance.IsJumpState)
            {
                var config = DungeonOpenTimeConfig.Get(dungeonModel.dungeonResult.dataMapID);
                StartCoroutine(Co_DelayDisplay(config.DelayTime * 0.001f));
            }
            else
            {
                Display();
            }
        }
        protected override void OnPreOpen()
        {
            m_ContainerPoivt.gameObject.SetActive(false);
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
        }
        protected override void LateUpdate()
        {
            base.LateUpdate();
            timer -= Time.deltaTime;
            if (timer < 0f)
            {
                timer += 0.5f;
                var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
                var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
                DrawExitTimer((int)seconds);
            }
        }
        IEnumerator Co_DelayDisplay(float _delay)
        {
            yield return new WaitForSeconds(_delay);
            Display();
        }
        void Display()
        {
            m_ContainerPoivt.gameObject.SetActive(true);
            base.RequireDungeonExit();
            DisplayDungeonExit();
            DisplayAlliance();
            DisplayAutionItems();
            DisplayMyItems();
        }
        void DisplayDungeonExit()
        {
            var endTime = dungeonModel.GetCoolDownEndTime(DungeonCoolDownType.LeaveMap);
            var seconds = (endTime - TimeUtility.ServerNow).TotalSeconds;
            timer = (float)seconds - (int)seconds;
            DrawExitTimer((int)seconds);
        }
        void DrawExitTimer(int seconds)
        {
            m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue));
        }
        void DisplayAlliance()
@@ -122,7 +198,12 @@
        private void GotoAuction()
        {
            WindowCenter.Instance.Open<AuctionHouseWin>(false, 1);
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FairyAuction);
        }
        void ExitDungeon()
        {
            dungeonModel.ExitCurrentDungeon();
        }
        private void GenerateRewardBehaviour(List<DemonJarRewardBehaviour> rewardBehaviours, Transform _parent, int _needCount)
System/Realm/RealmAnimationBehaviour.cs
@@ -19,12 +19,16 @@
        float m_DeltaAngle { get { return 360f / 8; } }
        public bool rotating { get; private set; }
        public event Action onRotateComplete;
        public event Action onLevelUpComplete;
        RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
        public void SetDefault()
        {
            rotating = false;
            m_ContainerLine.gameObject.SetActive(false);
            for (int i = 0; i < m_RealmStages.Length; i++)
            {
@@ -99,6 +103,10 @@
            {
                StartRotate();
            }
            if (onLevelUpComplete != null)
            {
                onLevelUpComplete();
            }
        }
        RealmStageBehaviour GetRealmStageBeha(int index)
@@ -115,6 +123,7 @@
        void StartRotate()
        {
            rotating = true;
            if (m_RotateCoroutine != null)
            {
                StopCoroutine(m_RotateCoroutine);
@@ -124,6 +133,7 @@
        public void Dispose()
        {
            rotating = false;
            StopAllCoroutines();
            if (m_RotateCoroutine != null)
            {
@@ -185,6 +195,8 @@
            }
            m_ContainerEffectLine.localEulerAngles = Vector3.zero;
            rotating = false;
            if (onRotateComplete != null)
            {
                onRotateComplete();
System/Realm/RealmModel.cs
@@ -83,12 +83,15 @@
                    m_RealmProperties.Add(config.Lv, dict);
                }
                stages.Add(config.Lv);
                if (config.BossID != 0)
                if (config.Lv != 0)
                {
                    stages = new List<int>();
                    m_RealmStages.Add(stages);
                    stages.Add(config.Lv);
                    if (config.BossID != 0)
                    {
                        stages = new List<int>();
                        m_RealmStages.Add(stages);
                    }
                }
                if (!string.IsNullOrEmpty(config.equips))
@@ -155,6 +158,10 @@
        public int GetRealmStage(int realmLevel)
        {
            if (realmLevel == 0)
            {
                return 0;
            }
            for (int i = 0; i < m_RealmStages.Count; i++)
            {
                var stages = m_RealmStages[i];
System/Realm/RealmWin.cs
@@ -92,6 +92,7 @@
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            model.selectRealmRefresh += SelectRealmRefresh;
            m_RealmAnimation.onRotateComplete += OnRotateComplete;
            m_RealmAnimation.onLevelUpComplete += OnLevelUpComplete;
            cacheRealmLevel = PlayerDatas.Instance.baseData.realmLevel;
        }
@@ -124,6 +125,9 @@
            PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
            model.selectRealmRefresh -= SelectRealmRefresh;
            m_RealmAnimation.onRotateComplete -= OnRotateComplete;
            m_RealmAnimation.onLevelUpComplete -= OnLevelUpComplete;
            HideRealmUp();
        }
        protected override void OnAfterClose()
@@ -212,7 +216,8 @@
            }
            var config = RealmConfig.Get(model.selectRealm - 1);
            m_GotoBoss.gameObject.SetActive(model.selectRealm == realmLevel + 1 && config != null && config.BossID != 0);
            m_GotoBoss.gameObject.SetActive(!model.isBossPass && model.selectRealm == realmLevel + 1
                && config != null && config.BossID != 0);
        }
        void DisplayRealmBrief()
@@ -260,35 +265,22 @@
            if (dataType == PlayerDataType.RealmLevel)
            {
                var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
                if (realmLevel == model.realmMaxLevel)
                var stage = model.GetRealmStage(realmLevel);
                var currentStage = model.GetRealmStage(cacheRealmLevel);
                if (cacheRealmLevel > realmLevel || stage > currentStage + 1)
                {
                    DisplayRealmLevelUp();
                    DisplayRealmStages();
                }
                else
                {
                    var stage = model.GetRealmStage(realmLevel);
                    var currentStage = model.GetRealmStage(cacheRealmLevel);
                    model.selectRealm = realmLevel + 1;
                    if (cacheRealmLevel > realmLevel || stage > currentStage + 1)
                    List<int> realms = null;
                    if (model.TryGetRealmStages(currentStage, out realms))
                    {
                        model.selectRealm = realmLevel + 1;
                        DisplayRealmStages();
                        var index = realms.IndexOf(cacheRealmLevel);
                        m_RealmAnimation.DisplayLevelUp(realms.IndexOf(cacheRealmLevel));
                    }
                    else
                    {
                        List<int> realms = null;
                        if (model.TryGetRealmStages(currentStage, out realms))
                        {
                            var index = realms.IndexOf(cacheRealmLevel);
                            m_RealmAnimation.DisplayLevelUp(realms.IndexOf(cacheRealmLevel));
                            if (index == 3)
                            {
                                m_ContainerUnlockEquip.gameObject.SetActive(false);
                            }
                        }
                    }
                    cacheRealmLevel = realmLevel;
                }
                cacheRealmLevel = realmLevel;
            }
        }
@@ -311,11 +303,28 @@
            DisplayUnlockEquip();
        }
        private void OnLevelUpComplete()
        {
            var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
            if (realmLevel == model.realmMaxLevel)
            {
                model.selectRealm = realmLevel;
                DisplayRealmLevelUp();
            }
            else
            {
                model.selectRealm = realmLevel + 1;
            }
        }
        private void SelectRealmRefresh()
        {
            DisplayRealmBrief();
            DisplayRealmLevelUp();
            DisplayUnlockEquip();
            if (!m_RealmAnimation.rotating)
            {
                DisplayUnlockEquip();
            }
        }
        private void OnBack()
System/WindowJump/WindowJumpMgr.cs
@@ -723,6 +723,9 @@
                dungeonModel.currentDungeon = new Dungeon(AllianceBossModel.DATAMAPID, 1);
                SetJumpLogic<AllianceBossEntranceWin>();
                break;
            case JumpUIType.FairyAuction:
                SetJumpLogic<AuctionHouseWin>(_tagWinSearchModel.TABID);
                break;
            default:
                DebugEx.Log("未添加此跳转界面:" + jumpType);
                IsJumpState = false;
@@ -1679,6 +1682,7 @@
    LoginReward307 = 307, //登录奖励
    AllianceBoss1 = 308,//仙盟Boss1
    AllianceBoss2 = 309,//仙盟Boss2
    FairyAuction = 310,//仙盟拍卖行
    DhszTs = 1001,//定海神针功法提升界面
    HyqTs = 1002,//皓月枪功法提升界面