From 6c5be714298a9ede3a784cd578d4a7c1e14b150c Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Sun, 29 Dec 2024 17:30:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=8C=E5=A6=96=E6=94=BB=E5=87=BB=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meng_yao/Assets/Prefabs/charatar/enemy/SnowHp.prefab | 6 +++--- .../Assets/Prefabs/charatar/enemy/SnowHpControl.cs | 8 ++++++-- meng_yao/Assets/Prefabs/charatar/enemy/wood_min.prefab | 2 +- meng_yao/Assets/Prefabs/charatar/laohu.prefab | 7 +++++++ meng_yao/Assets/Prefabs/charatar/mkl.prefab | 10 ++++++++++ meng_yao/Assets/Prefabs/charatar/qi_e.prefab | 10 ++++++++++ meng_yao/Assets/common | 2 +- meng_yao/Assets/script/A_Fight/enemy.cs | 3 +-- 8 files changed, 39 insertions(+), 9 deletions(-) diff --git a/meng_yao/Assets/Prefabs/charatar/enemy/SnowHp.prefab b/meng_yao/Assets/Prefabs/charatar/enemy/SnowHp.prefab index 9b2c0006..be52f72a 100644 --- a/meng_yao/Assets/Prefabs/charatar/enemy/SnowHp.prefab +++ b/meng_yao/Assets/Prefabs/charatar/enemy/SnowHp.prefab @@ -80,7 +80,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: 100 + m_Text: "\U0001F4A5\U0001F525100" --- !u!114 &7426565245524278981 MonoBehaviour: m_ObjectHideFlags: 0 @@ -96,7 +96,7 @@ MonoBehaviour: minScale: {x: 2, y: 2, z: 2} maxScale: {x: 2.5, y: 2.5, z: 2.5} duration: 0.5 - moveSpeed: 0.5 - fadeDuration: 0 moveDistance: 1 + fadeDuration: 0 targetCanvas: {fileID: 0} + direction: 0 diff --git a/meng_yao/Assets/Prefabs/charatar/enemy/SnowHpControl.cs b/meng_yao/Assets/Prefabs/charatar/enemy/SnowHpControl.cs index f2d46df3..de5a3e5f 100644 --- a/meng_yao/Assets/Prefabs/charatar/enemy/SnowHpControl.cs +++ b/meng_yao/Assets/Prefabs/charatar/enemy/SnowHpControl.cs @@ -19,7 +19,7 @@ public class SnowHpControl : MonoBehaviour } - public void CreateText() + public void CreateText(bool isGoodDamege=false) { targetCanvas = transform.parent.GetComponent(); @@ -57,6 +57,9 @@ public class SnowHpControl : MonoBehaviour float randomScaleY = Random.Range(minScale.y, maxScale.y); transform.localScale = new Vector3(randomScaleX, randomScaleY, 1f); + // 如果是暴击,增加物体的初始大小 + Vector3 finalScale = isGoodDamege ? maxScale * 2f : maxScale; // 如果是暴击,放大1.5倍 + // 使用DOTween做跳跃动画 Sequence sequence = DOTween.Sequence(); @@ -67,7 +70,8 @@ public class SnowHpControl : MonoBehaviour //sequence.Join(transform.DOMoveY(initialPosition.y -( randomY + moveDistance) / 2f, 0.6f) // .SetEase(Ease.OutQuad) // 跳跃的高度,跟X轴的跳跃配合 //); - sequence.Join(transform.DOScale(maxScale, 0.5f) // 同时控制大小,从初始值到最大值 + + sequence.Join(transform.DOScale(finalScale, 0.5f) // 同时控制大小,从初始值到最大值 .SetEase(Ease.OutBack) // 使用OutBack让物体变大时有一个“弹跳”的效果 ); diff --git a/meng_yao/Assets/Prefabs/charatar/enemy/wood_min.prefab b/meng_yao/Assets/Prefabs/charatar/enemy/wood_min.prefab index 1bca11aa..cecae3ef 100644 --- a/meng_yao/Assets/Prefabs/charatar/enemy/wood_min.prefab +++ b/meng_yao/Assets/Prefabs/charatar/enemy/wood_min.prefab @@ -330,7 +330,7 @@ MonoBehaviour: id: 0 Name: camp: 1 - hp: 50 + hp: 25 dieIndex: 1 Hpfiil: {fileID: 1566038940701374259} HpfiilYello: {fileID: 605146830908541898} diff --git a/meng_yao/Assets/Prefabs/charatar/laohu.prefab b/meng_yao/Assets/Prefabs/charatar/laohu.prefab index 79601809..287e5fa0 100644 --- a/meng_yao/Assets/Prefabs/charatar/laohu.prefab +++ b/meng_yao/Assets/Prefabs/charatar/laohu.prefab @@ -500,6 +500,7 @@ MonoBehaviour: gold: 10 MaxAttack: 5 MinAttack: 4 + isGoodDamege: 0 physicalArmor: 10 magicArmor: 5 Navigation: {fileID: 0} @@ -525,6 +526,12 @@ MonoBehaviour: - {fileID: 21300000, guid: fdd1af82c4a2e3b43adb1ef595ec34d0, type: 3} - {fileID: 21300000, guid: 4043457f6fd1cda4eb486839f31d2806, type: 3} harmNumber: 0 + Defense: 0 + DamageToPlayer: 0 + HealthPerLevel: 0 + DefensePerLevel: 0 + elementType: 3 + defenseType: 0 --- !u!61 &-3836672401185760439 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/Prefabs/charatar/mkl.prefab b/meng_yao/Assets/Prefabs/charatar/mkl.prefab index 6e6ebd4a..32cbb4dd 100644 --- a/meng_yao/Assets/Prefabs/charatar/mkl.prefab +++ b/meng_yao/Assets/Prefabs/charatar/mkl.prefab @@ -161,7 +161,10 @@ MonoBehaviour: isShowPanel: 0 instantiatedPanel: {fileID: 0} OrigScale: {x: 0, y: 0, z: 0} + StartSizeX: 0 + StartSizeY: 0 OrSizeX: 0 + OrSizeY: 0 --- !u!1 &6070656209494785206 GameObject: m_ObjectHideFlags: 0 @@ -486,6 +489,7 @@ MonoBehaviour: gold: 10 MaxAttack: 6 MinAttack: 4 + isGoodDamege: 0 physicalArmor: 10 magicArmor: 5 Navigation: {fileID: 0} @@ -511,6 +515,12 @@ MonoBehaviour: - {fileID: 21300000, guid: 0adb087419dd674498495bad0175fc85, type: 3} - {fileID: 21300000, guid: d899198e4c5678843aa5f2143bbc226f, type: 3} harmNumber: 0 + Defense: 0 + DamageToPlayer: 0 + HealthPerLevel: 0 + DefensePerLevel: 0 + elementType: 1 + defenseType: 0 --- !u!61 &-3836672401185760439 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/Prefabs/charatar/qi_e.prefab b/meng_yao/Assets/Prefabs/charatar/qi_e.prefab index 7b730575..b9e8cf9b 100644 --- a/meng_yao/Assets/Prefabs/charatar/qi_e.prefab +++ b/meng_yao/Assets/Prefabs/charatar/qi_e.prefab @@ -77,7 +77,10 @@ MonoBehaviour: isShowPanel: 0 instantiatedPanel: {fileID: 0} OrigScale: {x: 0, y: 0, z: 0} + StartSizeX: 0 + StartSizeY: 0 OrSizeX: 0 + OrSizeY: 0 --- !u!1 &3418438549176293054 GameObject: m_ObjectHideFlags: 0 @@ -486,6 +489,7 @@ MonoBehaviour: gold: 10 MaxAttack: 10 MinAttack: 7 + isGoodDamege: 0 physicalArmor: 10 magicArmor: 5 Navigation: {fileID: 0} @@ -511,6 +515,12 @@ MonoBehaviour: - {fileID: 21300000, guid: cfd21a22d56637e44b11ed37c12db481, type: 3} - {fileID: 21300000, guid: 1ccc75d4e69b889498b2e30ca0e77bb1, type: 3} harmNumber: 0 + Defense: 0 + DamageToPlayer: 0 + HealthPerLevel: 0 + DefensePerLevel: 0 + elementType: 2 + defenseType: 0 --- !u!61 &-3836672401185760439 BoxCollider2D: m_ObjectHideFlags: 0 diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index bf88fb96..44483bcb 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit bf88fb96a3125ef91388146665eeab8f80aa2f25 +Subproject commit 44483bcb6a3dcf7477cf902b1afb616b65111a9a diff --git a/meng_yao/Assets/script/A_Fight/enemy.cs b/meng_yao/Assets/script/A_Fight/enemy.cs index a7910b05..81d94dc9 100644 --- a/meng_yao/Assets/script/A_Fight/enemy.cs +++ b/meng_yao/Assets/script/A_Fight/enemy.cs @@ -72,8 +72,7 @@ public class enemy : Role [Header("每级提升防御力")] public float DefensePerLevel; [Header("五行类型")] public ElementType elementType; [Header("防御类型")] public DefenseType defenseType; - [Header("所属空地类型")] public UnitType unitType; - [Header("身形大小")] public Size size; + public override void Start() { base.Start();