diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs index bb4af5d43..095d45059 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs @@ -5,6 +5,8 @@ using UnityEngine; public class SkillUp : MonoBehaviour { + [Header("基类")] public Role role; + [HideInInspector]public Fun fun;//用于buff的创建 [Header("攻击伤害加成倍数")] public float DamageUp=1f; [Header("攻击范围加成倍数")] public float AttackRange = 1f; [Header("攻击冷却加成倍速")] public float AttackCooldown = 1f; diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs index 4c4528ebc..1739393b6 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs @@ -1,6 +1,10 @@ +using System; using System.Collections; using System.Collections.Generic; +using Unity.VisualScripting; +using UnityEditor.U2D.Path.GUIFramework; using UnityEngine; +using static Google.Protobuf.Reflection.ExtensionRangeOptions.Types; public class laohuSkillUp :SkillUp { @@ -9,7 +13,6 @@ public class laohuSkillUp :SkillUp /// public override void Skill_1_1() { - base.Skill_1_1(); base.AttackRange *= 2; } /// @@ -18,7 +21,11 @@ public class laohuSkillUp :SkillUp public override void Skill_1_3() { base.AttackRange *= 0.75f; - //buff + // 创建一个眩晕 Buff(持续1秒,20%概率) + Action decelerationBuff = fun.CreateDecelerationBuff(1f, 0.2f); + + // 将 Buff 添加到玩家的 storageBuff 列表中 + role.AddBuff(role.storageBuff,decelerationBuff); } /// /// 喷火冷却时间减少50%,持续喷火时间减少50% diff --git a/meng_yao/Assets/script/A_Fight/enemy.cs b/meng_yao/Assets/script/A_Fight/enemy.cs index 6ef14add1..e87757c42 100644 --- a/meng_yao/Assets/script/A_Fight/enemy.cs +++ b/meng_yao/Assets/script/A_Fight/enemy.cs @@ -6,11 +6,8 @@ public class enemy : Role { public string enemyId; [Header("移动速度")] public float moveSpeed; - [HideInInspector] public float harmNumber = 0; // 伤害 - - public float HarmNumber { get => harmNumber;