少年修仙传客户端代码仓库
Hale Cai
2018-08-10 018b0b033fb26de0799e323fc6cd42db04602eff
fixed #2324 【开发】新手战斗石头人引导优化
5个文件已修改
151 ■■■■■ 已修改文件
Fight/Actor/AI/HeroAI_KillUntilDie.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Hero.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/PreFightMission.cs 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/MapEditor/NewGuideModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/MapEditor/NewGuideWin.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAI_KillUntilDie.cs
@@ -151,7 +151,7 @@
        // 确定要使用的技能
        // 是否存在预设定的技能
        if (m_FirstSkill != -1)
        if (m_FirstSkill > 0)
        {
            _skill = _hero.SkillMgr.Get(m_FirstSkill);
        }
Fight/GameActor/GA_Hero.cs
@@ -720,12 +720,9 @@
        Behaviour.StartKillUntilDieAI();
        if (aiHandler.IsAuto())
        if (OnUserClickSkill != null)
        {
            if (OnUserClickSkill != null)
            {
                OnUserClickSkill(0);
            }
            OnUserClickSkill(0);
        }
    }
Fight/PreFightMission.cs
@@ -65,6 +65,14 @@
        public byte status;
    }
    private enum E_AfterAttackType
    {
        None,
        RefreshRock,
    }
    private E_AfterAttackType m_AfterAttackType;
    public Dictionary<uint, Mission> s_MissionDict = new Dictionary<uint, Mission>();
    public Dictionary<uint, List<int>> missionNpcDict = new Dictionary<uint, List<int>>();
@@ -182,6 +190,9 @@
    public void Start()
    {
        NewGuideModel _model = ModelCenter.Instance.GetModel<NewGuideModel>();
        _model.arrowScale = 1;
        IsHeroCanCastSkill = false;
        Transform _temp = null;
        _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/CopyOfThePanel/TopRightTip");
@@ -366,6 +377,7 @@
            return;
        }
        WindowCenter.Instance.Close<NewGuideWin>();
        WindowCenter.Instance.Close<GuideMessageWin>();
        needCreate1002 = true;
@@ -423,6 +435,23 @@
        m_MoveToEffect = SFXPlayUtility.Instance.Play(1052, PlayerDatas.Instance.hero.Root);
        FaceTargetXZ _f = m_MoveToEffect.gameObject.AddComponent<FaceTargetXZ>();
        _f.target = m_FuncNpc.Root;
        SnxxzGame.Instance.StartCoroutine(WaitForGoToNpc(_pos));
    }
    private IEnumerator WaitForGoToNpc(Vector3 pos)
    {
        GA_Hero _hero = PlayerDatas.Instance.hero;
        while (true)
        {
            if (_hero.IsIdle())
            {
                break;
            }
            yield return null;
        }
        PlayerDatas.Instance.hero.MoveToPosition(pos);
    }
    private void HandlerMission(uint missionId)
@@ -616,10 +645,11 @@
        _temp.localScale = Vector3.one;
        NewGuideModel _model = ModelCenter.Instance.GetModel<NewGuideModel>();
        _model.showMask = false;
        _model.content = "返回向师兄回复";
        _model.content = "";
        _model.componentPath = "NormalCanvas/TreasureSelectWin/Btn_Back";
        _model.size = new Vector2(92, 81);
        _model.direction = 2;
        _model.arrowScale = 2;
        _model.pressedClose = false;
        _model.clickClosed = true;
        _model.onClose = null;
@@ -862,36 +892,18 @@
             m_UIEffect = EffectMgr.Instance.PlayUIEffect(1096, 4500, _temp, true);
             NewGuideModel _model2 = ModelCenter.Instance.GetModel<NewGuideModel>();
             _model2.showMask = true;
             _model2.showMask = false;
             _model2.content = "连续按图标\r\n使用<color=#00ff00>普通攻击</color>";
             _model2.componentPath = "BaseCanvas/MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/AttackBtn";
             _model2.size = new Vector2(178, 178);
             _model2.direction = 0;
             _model2.pressedClose = true;
             _model2.clickClosed = true;
             _model2.onClose = () =>
             {
                 // 打开小提示窗口
                 GuideMessageModel _model = ModelCenter.Instance.GetModel<GuideMessageModel>();
                 _model.content = "清除前方<color=#00ff00>所有敌人</color>";
                 _model.duration = -1;
             _model2.pressedClose = false;
             _model2.clickClosed = false;
                 WindowCenter.Instance.Open<GuideMessageWin>();
             m_AfterAttackType = E_AfterAttackType.RefreshRock;
             GA_Hero.OnUserClickSkill += OnCastSkill;
                 if (m_UIEffect)
                 {
                     EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
                     m_UIEffect = null;
                 }
                 Refresh_1001();
                 // 显示头像区域
                 _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/HeadPortraitTip");
                 _temp.localScale = Vector3.one;
                 updateAI = true;
             };
             _model2.onClose = null;
             WindowCenter.Instance.Open<NewGuideWin>();
         });
@@ -1039,6 +1051,18 @@
            m_SimpleTransfer = CreateTransfer();
        }
        NewGuideModel _model2 = ModelCenter.Instance.GetModel<NewGuideModel>();
        _model2.showMask = false;
        _model2.content = "使用普通攻击\r\n破坏<color=#00ff00>栅栏</color>";
        _model2.componentPath = "BaseCanvas/MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/AttackBtn";
        _model2.size = new Vector2(178, 178);
        _model2.direction = 0;
        _model2.pressedClose = false;
        _model2.clickClosed = false;
        _model2.onClose = null;
        WindowCenter.Instance.Open<NewGuideWin>();
        SnxxzGame.Instance.StartCoroutine(DelayCloseNewGuideWin(3f));
        Transform _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/TaskAndTeamTip/TaskListTip");
        _temp.gameObject.SetActive(false);
        _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/TaskSwithButton");
@@ -1050,17 +1074,6 @@
        m_SimpleTransfer.Init(-1, _pos, false, null, () =>
         {
             NewGuideModel _model2 = ModelCenter.Instance.GetModel<NewGuideModel>();
             _model2.showMask = false;
             _model2.content = "使用普通攻击\r\n破坏<color=#00ff00>栅栏</color>";
             _model2.componentPath = "BaseCanvas/MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/AttackBtn";
             _model2.size = new Vector2(178, 178);
             _model2.direction = 0;
             _model2.pressedClose = false;
             _model2.clickClosed = true;
             _model2.onClose = null;
             WindowCenter.Instance.Open<NewGuideWin>();
             HeroBehaviour.onCastSkill += OnCastSkill;
             _pos = new Vector3(124.65f, 51.494f, 33.01f);
@@ -1109,9 +1122,48 @@
        GameObjectPoolManager.Instance.UnLoadNPC(1000);
    }
    private IEnumerator DelayCloseNewGuideWin(float time)
    {
        float _time = Time.realtimeSinceStartup;
        while (Time.realtimeSinceStartup - _time < time)
        {
            yield return null;
        }
        WindowCenter.Instance.Close<NewGuideWin>();
    }
    private void OnCastSkill(int skillID)
    {
        GA_Hero.OnUserClickSkill -= OnCastSkill;
        if (m_AfterAttackType == E_AfterAttackType.RefreshRock)
        {
            // 打开小提示窗口
            GuideMessageModel _model = ModelCenter.Instance.GetModel<GuideMessageModel>();
            _model.content = "清除前方<color=#00ff00>所有敌人</color>";
            _model.duration = -1;
            WindowCenter.Instance.Open<GuideMessageWin>();
            if (m_UIEffect)
            {
                EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
                m_UIEffect = null;
            }
            Refresh_1001();
            // 显示头像区域
            Transform _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/HeadPortraitTip");
            _temp.localScale = Vector3.one;
            updateAI = true;
            m_AfterAttackType = E_AfterAttackType.None;
            return;
        }
        if (WindowCenter.Instance.CheckOpen<NewGuideWin>())
        {
            WindowCenter.Instance.Close<NewGuideWin>();
Fight/Stage/MapEditor/NewGuideModel.cs
@@ -21,6 +21,7 @@
    /// 说明文字及箭头的方向, 0123 上下左右
    /// </summary>
    public byte direction;
    public float arrowScale = 1f;
    public override void Init()
    {
Fight/Stage/MapEditor/NewGuideWin.cs
@@ -49,8 +49,17 @@
            holdImage.cell = _model.size;
            rtSelectFrame.sizeDelta = _model.size + new Vector2(15, 15);
            if (string.IsNullOrEmpty(_model.content))
            {
                rtContent.gameObject.SetActive(false);
            }
            else
            {
                rtContent.gameObject.SetActive(true);
            }
            txtContent.text = _model.content;
            m_PressClose = _model.pressedClose;
            rtArrow.localScale = Vector3.one * _model.arrowScale;
            container.gameObject.SetActive(_model.showMask);
            if (_model.onClose != null)
@@ -115,25 +124,25 @@
                {
                    _arrowPosition = rtSelectFrame.anchoredPosition + new Vector2(0, rtSelectFrame.sizeDelta.y * .5f + 20f);
                    _contentPosition = _arrowPosition + new Vector2(0, rtArrow.sizeDelta.y * .5f + rtContent.sizeDelta.y * .5f + 5);
                    _rotation = Vector3.zero;
                    _rotation = new Vector3(0, 0, 90);
                }
                else if (m_Direction == 1)// 下
                {
                    _arrowPosition = rtSelectFrame.anchoredPosition + new Vector2(0, -rtSelectFrame.sizeDelta.y * .5f - 20f);
                    _contentPosition = _arrowPosition + new Vector2(0, -rtArrow.sizeDelta.y * .5f - rtContent.sizeDelta.y * .5f - 5);
                    _rotation = new Vector3(0, 0, 180);
                    _rotation = new Vector3(0, 0, 270);
                }
                else if (m_Direction == 2)// 左
                {
                    _arrowPosition = rtSelectFrame.anchoredPosition + new Vector2(-rtSelectFrame.sizeDelta.x * .5f - 20f, 0);
                    _contentPosition = _arrowPosition + new Vector2(-rtArrow.sizeDelta.x * .5f - rtContent.sizeDelta.x * .5f - 5, 0);
                    _rotation = new Vector3(0, 0, 90);
                    _rotation = new Vector3(0, 0, 180);
                }
                else if (m_Direction == 3)// 右
                {
                    _arrowPosition = rtSelectFrame.anchoredPosition + new Vector2(rtSelectFrame.sizeDelta.x * .5f + 20f, 0);
                    _contentPosition = _arrowPosition + new Vector2(rtArrow.sizeDelta.x * .5f + rtContent.sizeDelta.x * .5f + 5, 0);
                    _rotation = new Vector3(0, 0, 270);
                    _rotation = Vector3.zero;
                }
                rtArrow.anchoredPosition = _arrowPosition;