少年修仙传客户端代码仓库
client_Wu Xijin
2018-12-04 d281404cc842371d9c484e61d86e314f23db81af
2572 【1.3.100】小地图显示优化
1个文件已修改
28 ■■■■ 已修改文件
System/WorldMap/LocalMapFindPath.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WorldMap/LocalMapFindPath.cs
@@ -32,16 +32,22 @@
        int mapId = 0;
        public void Init(int _mapId)
        {
            if (_mapId != mapMatrix.mapId)
            mapId = _mapId;
            if (mapId != mapMatrix.mapId)
            {
                PathPointClear();
            }
            if (mapId == PlayerDatas.Instance.baseData.MapID)
            {
                m_HeroHead.gameObject.SetActive(true);
            var job = PlayerDatas.Instance.baseData.Job;
            m_HeroHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
            mapId = _mapId;
            var tagChinMap = Config.Instance.Get<MapConfig>(mapId);
            }
            else
            {
                m_HeroHead.gameObject.SetActive(false);
            }
            MapResourcesConfig mapResConfig = null;
            if (mapId == PlayerDatas.Instance.baseData.MapID)
@@ -80,6 +86,8 @@
            m_BoundDrag.onBeginDrag.AddListener(OnBeginDrag);
            model.selectMapEventPointEvent += FoucsEventPoint;
            if (PlayerDatas.Instance.baseData.MapID == mapId)
            {
            var hero = PlayerDatas.Instance.hero;
            if (hero != null)
            {
@@ -93,6 +101,7 @@
                }
                hero.OnPathFinding += OnHeroStartMove;
                hero.OnPathFindStop += OnHeroStopMove;
                }
            }
        }
@@ -118,6 +127,11 @@
        void HeroMoveTo(Vector3 _position)
        {
            if (mapId != PlayerDatas.Instance.baseData.MapID)
            {
                return;
            }
            if (PlayerDatas.Instance.hero == null)
            {
                return;
@@ -127,7 +141,6 @@
            PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
            PlayerDatas.Instance.hero.IdleImmediate();
            PlayerDatas.Instance.hero.MoveToPosition(position);
        }
@@ -155,7 +168,10 @@
        private void LateUpdate()
        {
            if (mapId == PlayerDatas.Instance.baseData.MapID)
            {
            UpdateHeroPosition();
            }
        }
        Vector3 ScreenToWorldPosition(Vector3 _sp)
@@ -267,7 +283,7 @@
            var waypoints = Config.Instance.GetAllValues<maptransportConfig>();
            foreach (var waypoint in waypoints)
            {
                if (waypoint.OriginalMapID == PlayerDatas.Instance.baseData.MapID)
                if (waypoint.OriginalMapID == this.mapId)
                {
                    DrawWayPoint(waypoint.TransportID);
                }