From 35a6b678632f4e756af236e887480c5366f2ff18 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Sat, 28 Dec 2024 14:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BB=E5=87=BB=E8=8C=83=E5=9B=B4=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meng_yao/Assets/Prefabs/charatar/laohu.prefab | 5 +++++ meng_yao/Assets/Prefabs/charatar/mkl.prefab | 5 +++++ meng_yao/Assets/Prefabs/charatar/qi_e.prefab | 5 +++++ meng_yao/Assets/common | 2 +- meng_yao/Assets/script/A_Fight/CharacterClick.cs | 12 +++++++++--- .../Assets/script/A_Fight/SkillUp/mkl_SkillUp.cs | 3 ++- meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs | 2 ++ 7 files changed, 29 insertions(+), 5 deletions(-) diff --git a/meng_yao/Assets/Prefabs/charatar/laohu.prefab b/meng_yao/Assets/Prefabs/charatar/laohu.prefab index 13da7d181..38eb20bc7 100644 --- a/meng_yao/Assets/Prefabs/charatar/laohu.prefab +++ b/meng_yao/Assets/Prefabs/charatar/laohu.prefab @@ -107,6 +107,8 @@ MonoBehaviour: attackRange: {fileID: 7939695578342722628} isShowPanel: 0 instantiatedPanel: {fileID: 0} + OrigScale: {x: 0, y: 0, z: 0} + OrSizeX: 0 --- !u!1 &7939695578342722628 GameObject: m_ObjectHideFlags: 0 @@ -373,6 +375,7 @@ MonoBehaviour: attackRangeSprite: {fileID: 4735534361623519927} AttackStayTime: 2 Target: {fileID: 0} + characterClick: {fileID: 8940501394638592702} isAttack: 1 flag: 0 timer: 0 @@ -510,6 +513,8 @@ MonoBehaviour: isHit: 0 myTags: 0 mySkillUp: {fileID: 1061754087244483355} + IsDead: 0 + HaveDieTime: 0 enemyId: moveSpeed: 0 MengyaoSprite: {fileID: 21300000, guid: d3d3d16c3383ae1468c21c193ac1d2e8, type: 3} diff --git a/meng_yao/Assets/Prefabs/charatar/mkl.prefab b/meng_yao/Assets/Prefabs/charatar/mkl.prefab index afdccbe9e..6e6ebd4a2 100644 --- a/meng_yao/Assets/Prefabs/charatar/mkl.prefab +++ b/meng_yao/Assets/Prefabs/charatar/mkl.prefab @@ -160,6 +160,8 @@ MonoBehaviour: attackRange: {fileID: 681042887138380540} isShowPanel: 0 instantiatedPanel: {fileID: 0} + OrigScale: {x: 0, y: 0, z: 0} + OrSizeX: 0 --- !u!1 &6070656209494785206 GameObject: m_ObjectHideFlags: 0 @@ -373,6 +375,7 @@ MonoBehaviour: attackRangeSprite: {fileID: 2211402838936384874} AttackStayTime: 0 Target: {fileID: 0} + characterClick: {fileID: 8274433498955506092} isAttack: 1 flag: 0 timer: 0 @@ -499,6 +502,8 @@ MonoBehaviour: isHit: 0 myTags: 0 mySkillUp: {fileID: 3258498600701209889} + IsDead: 0 + HaveDieTime: 0 enemyId: moveSpeed: 0 MengyaoSprite: {fileID: 21300000, guid: 602511914339bfa4896fd45f36054865, type: 3} diff --git a/meng_yao/Assets/Prefabs/charatar/qi_e.prefab b/meng_yao/Assets/Prefabs/charatar/qi_e.prefab index 7e310250c..7b7305759 100644 --- a/meng_yao/Assets/Prefabs/charatar/qi_e.prefab +++ b/meng_yao/Assets/Prefabs/charatar/qi_e.prefab @@ -76,6 +76,8 @@ MonoBehaviour: attackRange: {fileID: 3418438549176293054} isShowPanel: 0 instantiatedPanel: {fileID: 0} + OrigScale: {x: 0, y: 0, z: 0} + OrSizeX: 0 --- !u!1 &3418438549176293054 GameObject: m_ObjectHideFlags: 0 @@ -373,6 +375,7 @@ MonoBehaviour: attackRangeSprite: {fileID: 202225011326617106} AttackStayTime: 0 Target: {fileID: 0} + characterClick: {fileID: 4417703037588761391} isAttack: 1 flag: 0 timer: 0 @@ -499,6 +502,8 @@ MonoBehaviour: isHit: 0 myTags: 0 mySkillUp: {fileID: 206052671066122143} + IsDead: 0 + HaveDieTime: 0 enemyId: moveSpeed: 0 MengyaoSprite: {fileID: 21300000, guid: e42ec8eaea1c0434d9151c05ab649b49, type: 3} diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index 53e24b624..e181aec8b 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit 53e24b624e206126bddcc2e0d8399a442d741901 +Subproject commit e181aec8b1cfd1b630cbcdb3dc4f450db9ea8cf1 diff --git a/meng_yao/Assets/script/A_Fight/CharacterClick.cs b/meng_yao/Assets/script/A_Fight/CharacterClick.cs index e897585d2..6f0f8ab7e 100644 --- a/meng_yao/Assets/script/A_Fight/CharacterClick.cs +++ b/meng_yao/Assets/script/A_Fight/CharacterClick.cs @@ -7,12 +7,14 @@ using UnityEngine.EventSystems; public class CharacterClick : MonoBehaviour { public Role role; - public Character MyCharacter=null; + public Character MyCharacter = null; [Header("点击出现的详情")] public GameObject panelPrefab; [Header("点击出现的攻击范围")] public GameObject attackRange; [Header("是否已经显示面板")] public bool isShowPanel = false; [Header("显示的信息面板")] public GameObject instantiatedPanel; - private Vector3 OrigScale; + + public Vector3 OrigScale; + public float OrSizeX; private bool isShowAttackRange=true; public WaveData MyWaveData=null; void Start() @@ -20,6 +22,10 @@ public class CharacterClick : MonoBehaviour if (attackRange!=null) { OrigScale = attackRange.transform.localScale; + OrSizeX = attackRange.GetComponent().bounds.size.x; + role.attackClass.SetAttackRange(); + + //ShowAttackRange(UIContorl.instance.NowAttackRange); } if (transform.GetComponent()!=null) @@ -105,7 +111,7 @@ public class CharacterClick : MonoBehaviour { if (attackRange!=null) { - attackRange.transform.DOScale(OrigScale, 0.3f).SetEase(Ease.InOutBack); + attackRange.transform.DOScale(new Vector2(OrSizeX, OrSizeX), 0.3f).SetEase(Ease.InOutBack); } diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/mkl_SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/mkl_SkillUp.cs index c6ddb69f8..bb55ac103 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/mkl_SkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/mkl_SkillUp.cs @@ -50,6 +50,7 @@ public class mkl_SkillUp : SkillUp public override void Skill_2_5() { CriticalRate += 0.2f; - AttackRange += -1; + base.AttackRange += -1; + attack.SetAttackRange(); } } diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs index fd3dd700a..3d6925642 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs @@ -18,6 +18,7 @@ public class qieSkillUp : SkillUp { base.SpeedOfBullets += 0.2f; base.AttackRange += -1; + attack.SetAttackRange(); } /// /// 对处于减速的敌人造成额外30%伤害。 攻击CD增加5% @@ -50,5 +51,6 @@ public class qieSkillUp : SkillUp { DamageOfMin += 0.25f; AttackRange += -1; + attack.SetAttackRange(); } }