少年修仙传客户端代码仓库
client_Wu Xijin
2018-09-26 356ab36df901f873a90a757f255389ddbfd589ee
Merge branch 'master' into BossFakeLine
8个文件已修改
4个文件已添加
279 ■■■■■ 已修改文件
System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DogzDungeon/DogzDungeonModel.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DogzDungeon/DogzDungeonWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/DemonJarModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousModel.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/LoginWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/RichText.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/PromoteDetailsWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/RotatePointer.cs 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/RotatePointer.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneWin.cs 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/VipInvest/WheelOfFortuneWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DogzDungeon/DogzDungeonBreifInfoBehaviour.cs
@@ -178,14 +178,14 @@
            switch (config.MonsterType)
            {
                case 1:
                    m_BossName.text = _name;
                    m_BossLevel.text = string.Empty;
                    break;
                case 2:
                    m_BossName.text = _name;
                    m_BossName.text = Language.Get("DogzMap1");
                    m_BossLevel.text = string.Empty;
                    break;
                case 3:
                    m_BossName.text = Language.Get("DogzMap2");
                    m_BossLevel.text = string.Empty;
                    break;
                case 4:
                    m_BossName.text = _name;
                    m_BossLevel.text = Language.Get("Z1024", _level);
System/DogzDungeon/DogzDungeonModel.cs
@@ -6,10 +6,10 @@
namespace Snxxz.UI
{
    public class DogzDungeonModel : Model
    public class DogzDungeonModel : Model, IPlayerLoginOk
    {
        public const int DOGZDUNGEON_REDPOINT = 76009;
        public const int DOGZDUNGEON_REDPOINT = 77002;
        public const int DATA_MAPID = 21110;
        int m_SelectedBoss = 0;
@@ -36,6 +36,7 @@
                if (m_WearyValue != value)
                {
                    m_WearyValue = value;
                    UpdateRedpoint();
                    if (bossWearyValueChangeEvent != null)
                    {
                        bossWearyValueChangeEvent();
@@ -75,7 +76,7 @@
        Dictionary<int, DogzDungeonBossData> bosses = new Dictionary<int, DogzDungeonBossData>();
        public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox();
        public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite();
        Redpoint redpoint = new Redpoint(DOGZDUNGEON_REDPOINT);
        public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DOGZDUNGEON_REDPOINT);
        FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
@@ -114,9 +115,9 @@
        public int GetRecommendNpc()
        {
            if (bigBoxCollectCount < 2) //未疲劳
            if (bigBoxCollectCount < GeneralConfig.Instance.dogzBoxLimit)
            {
                return bigBoxNpcId;//大宝箱npc id
                return bigBoxNpcId;
            }
            if (wearyValue < GeneralConfig.Instance.bossWearyValues[2])
@@ -125,21 +126,17 @@
                for (int i = sortedBossIds.Count - 1; i >= 0; i--)
                {
                    var bossId = sortedBossIds[i];
                    var dogzConfig = Config.Instance.Get<DogzDungeonConfig>(bossId);
                    if (dogzConfig.MonsterType == 3 || dogzConfig.MonsterType == 4)
                    var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
                    if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV)
                    {
                        var npcConfig = Config.Instance.Get<NPCConfig>(bossId);
                        if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV)
                        {
                            return bossId;
                        }
                        return bossId;
                    }
                }
                return sortedBossIds[0];
            }
            return bigBoxNpcId;//大宝箱 npcid
            return eliteMonsters[0];
        }
        public int GetRecommendKillElite()
@@ -310,6 +307,19 @@
            }
        }
        public void OnPlayerLoginOk()
        {
            UpdateRedpoint();
        }
        private void UpdateRedpoint()
        {
            var wearyValueLimit = GeneralConfig.Instance.bossWearyValues[2];
            redpoint.count = wearyValueLimit - wearyValue;
            redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
        }
        private void ParseConfig()
        {
            var configs = Config.Instance.GetAllValues<DogzDungeonConfig>();
@@ -335,6 +345,7 @@
            sortedBossIds.Sort(DogzDungeonBossData.LevelCompare);
        }
    }
    public class DogzDungeonBox
@@ -413,8 +424,7 @@
        public int id { get; private set; }
        public bool isUnLocked {
            get {
                var config = Config.Instance.Get<NPCConfig>(id);
                return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
                return true;
            }
        }
System/DogzDungeon/DogzDungeonWin.cs
@@ -209,7 +209,7 @@
                case 2:
                    m_ContainerBoxCollectWeary.gameObject.SetActive(true);
                    m_ContainerBossKillWeary.gameObject.SetActive(false);
                    var bigBoxCollectCountLimit = 2;
                    var bigBoxCollectCountLimit = GeneralConfig.Instance.dogzBoxLimit;
                    m_BoxCollectWearyValue.text = StringUtility.Contact(model.bigBoxCollectCount, "/", bigBoxCollectCountLimit);
                    m_BoxCollectWearyValue.colorType = model.bigBoxCollectCount >= bigBoxCollectCountLimit ? TextColType.Red : TextColType.DarkGreen;
                    break;
System/FindPrecious/DemonJarModel.cs
@@ -17,9 +17,10 @@
        public const int DEMONJAR_SINGLEMAPID = 52020;
        public const int DEMONJAR_MAPID = 52010;
        const int DEMONJAR_REDPOINTID = 76005;
        Redpoint redpoint = new Redpoint(DEMONJAR_REDPOINTID);
        public const int DEMONJAR_REDPOINTID = 77001;
        public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, DEMONJAR_REDPOINTID);
        bool m_IsDoubleAward = false;
        public bool isDoubleAward {
System/FindPrecious/FindPreciousModel.cs
@@ -11,7 +11,10 @@
    {
        public const int PREPOSE_SECONDS = 300;
        public const int FINDPRECIOUS_REDPOINTID = 76000;
        public const int LOOTPRECIOUs_REDPOINTID = 77000;
        Redpoint findPreciousRedpoint = new Redpoint(FINDPRECIOUS_REDPOINTID);
        Redpoint lootPreciousRedpoint = new Redpoint(LOOTPRECIOUs_REDPOINTID);
        int m_ViewKillRecordsBoss = 0;
        public int ViewKillRecordsBoss {
@@ -51,6 +54,7 @@
        WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } }
        BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
        PersonalBossModel personalBossModel { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
        DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
        public override void Init()
        {
@@ -395,6 +399,17 @@
                findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
                findPreciousRedpoint.count = totalCount;
            }
            if (_redpointId == DemonJarModel.DEMONJAR_REDPOINTID ||
                _redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT)
            {
                var demonJarRedpointCount = demonJarModel.redpoint.count;
                var dogzDungeonRedpointCount = dogzDungeonModel.redpoint.count;
                var totalCount = demonJarRedpointCount + dogzDungeonRedpointCount;
                lootPreciousRedpoint.count = totalCount;
                lootPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
            }
        }
        public FindPreciousType GetBossFindPreciousType(int _bossId)
System/Login/LoginWin.cs
@@ -57,7 +57,7 @@
        protected override void OnPreOpen()
        {
            m_BanHao.text = VersionConfig.Get().banHao;
            m_BanHao.text = string.IsNullOrEmpty(VersionConfig.Get().banHao) ? string.Empty : VersionConfig.Get().banHao;
            var sprite = Resources.Load<Sprite>("UI/Sprites/TB_DL_Logo");
            m_Logo.overrideSprite = sprite;
System/Message/RichText.cs
@@ -897,6 +897,10 @@
        }
        set
        {
            if (string.IsNullOrEmpty(value))
            {
                value = string.Empty;
            }
            m_RichText = value;
            SetRichTextDirty();
        }
System/Tip/PromoteDetailsWin.cs
@@ -94,7 +94,7 @@
                    WindowCenter.Instance.Open<RolePromoteWin>();
                    break;
                case RolePromoteModel.PromoteDetailType.Wash:
                    WindowCenter.Instance.Open<EquipReinforceWin>(false, 4);
                    WindowCenter.Instance.Open<EquipReinforceWin>(false, 3);
                    break;
                case RolePromoteModel.PromoteDetailType.FairyHeart:
                    WindowCenter.Instance.Open<MethodToWin>();
System/Vip/VipInvest/RotatePointer.cs
New file
@@ -0,0 +1,104 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Friday, September 21, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using DG.Tweening;
namespace Snxxz.UI {
    public class RotatePointer:MonoBehaviour {
        public bool _isRotate = false;//是否旋转
        public float Speed = 2000;//旋转速度
        public float Angle = 0; // 这个是设置停止的角度
        private float Acceleration = 0;//加速度
        private float _time;
        private bool IsRotateBool = false;//是否进行旋转
        [Header("总旋转时间")]
        public float ContinuousTime = 4;//旋转时间
        [Header("加速减速时间")]
        public float SpeedTime = 1;
        [Header("最小速度")]
        public float MinSpeed= 400;
        [Header("最大速度")]
        public float MaxSpeed = 800;
        private void OnEnable()
        {
            IsRotateBool = false;
            _time = 0;
            Acceleration = (MaxSpeed - MinSpeed) / SpeedTime;
        }
        void Update()
        {
            if (!_isRotate)
            {
              //  transform.DORotate(new Vector3(0, 0, 360 + Angle), 0.5f, RotateMode.FastBeyond360);
                return; //不旋转结束
            }
            if (IsRotateBool)
            {
                _time += Time.deltaTime;
                if (_time < SpeedTime)//匀加速
                {
                    Speed = MinSpeed + Acceleration * _time;
                    if (Speed >= MaxSpeed)
                    {
                        Speed = MaxSpeed;
                    }
                }
                else if (_time > ContinuousTime - SpeedTime)//匀减速
                {
                    Speed = MaxSpeed - Acceleration * (_time - (ContinuousTime - SpeedTime));
                    if (Speed <= MinSpeed)
                    {
                        Speed = MinSpeed;
                    }
                }
                else//匀速
                {
                    Speed = MaxSpeed;
                }
                if (_time < ContinuousTime) // 没结束
                {
                    transform.Rotate(Vector3.forward * Speed * Time.deltaTime);
                }
                else
                {
                    //结束,使用DoTween旋转到结束角度,耗时1秒
                    //这里有个360,使用来防止指针回转的,如果不加这个360,你会看到指针倒退
                    transform.DORotate(new Vector3(0, 0, 360 + Angle), 1f, RotateMode.FastBeyond360);
                    _isRotate = false; // 设置不旋转
                    IsRotateBool = false;
                }
            }
        }
        //外部调用,初始化时间和打开旋转
        public void SetTime()
        {
            _time =0;
            IsRotateBool = true;
            _isRotate = true;
        }
        //外部调用,设置停止角度
        public void SetAngle(float angle)
        {
            Angle = angle;
        }
    }
}
System/Vip/VipInvest/RotatePointer.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 172c3a5c67644144780312959c8d9b77
timeCreated: 1537517643
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Vip/VipInvest/WheelOfFortuneWin.cs
New file
@@ -0,0 +1,73 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Friday, September 21, 2018
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI {
    public class WheelOfFortuneWin : Window
    {
        [SerializeField] Button m_LotteryBtn;
        [SerializeField] RotatePointer m_RotatePointer;
        [SerializeField] Toggle m_Toggle;
        [SerializeField] Button m_CloseBtn;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_LotteryBtn.AddListener(OnClickButton);
            m_CloseBtn.AddListener(()=> { Close(); });
            m_Toggle.onValueChanged.AddListener(OnClickToggle);
        }
        protected override void OnPreOpen()
        {
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
        }
        private void OnClickButton()
        {
            m_RotatePointer.SetTime();
        }
        private void OnClickToggle(bool _bool)
        {
            if (_bool)
            {
                m_RotatePointer._isRotate = false;
                m_RotatePointer.SetAngle(m_RotatePointer.Angle);
            }
            else
            {
                m_RotatePointer._isRotate = true;
            }
        }
        #endregion
    }
}
System/Vip/VipInvest/WheelOfFortuneWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d96c4104107a562479b36326b574b15e
timeCreated: 1537517179
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: