From 4b51daaaab77b6dbb3a8bb8f18a3f63ae4617127 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Wed, 8 Jan 2025 18:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/script/A_Fight/SkillUp/SkillUp.cs | 53 ++++++++++--------- .../script/A_Fight/json/Mengyao_Skill_Date.cs | 2 + 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs index ee89f621..134adf22 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs @@ -136,36 +136,39 @@ public class SkillUp : Fun { foreach (string SkillId in info.SkillList) { - if (SkillId == "skill_0") - { - // 创建一个眩晕 Buff(持续1秒,20%概率) - Action decelerationBuff = CreateDecelerationBuff(1f, 0.2f); - - // 将 Buff 添加到玩家的 storageBuff 列表中 - role.AddBuff(role.storageBuff, decelerationBuff); - //Debug.LogError("使用技能1-3"); - } - if (SkillId == "skill_1") - { - NumberOfBullets += 2; - DamageUp += -0.5f; - } - if (SkillId == "skill_2") - { - Action decelerationBuff = CreateSlowDownBuff(0.2f, 3f); - // 将 Buff 添加到玩家的 storageBuff 列表中 - role.AddBuff(role.storageBuff, decelerationBuff); - } - - if (SkillId == "skill_3") - { - - } + useskill(SkillId); } } } + public virtual void useskill(string str) + { + + if (str == "skill_0") + { + // 创建一个眩晕 Buff(持续1秒,20%概率) + Action decelerationBuff = CreateDecelerationBuff(1f, 0.2f); + + // 将 Buff 添加到玩家的 storageBuff 列表中 + role.AddBuff(role.storageBuff, decelerationBuff); + //Debug.LogError("使用技能1-3"); + } + if (str == "skill_1") + { + NumberOfBullets += 2; + DamageUp += -0.5f; + } + if (str == "skill_2") + { + Action decelerationBuff = CreateSlowDownBuff(0.2f, 3f); + // 将 Buff 添加到玩家的 storageBuff 列表中 + role.AddBuff(role.storageBuff, decelerationBuff); + } + + + } + /// /// 使用技能 /// diff --git a/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs b/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs index 2a983ce5..1e6c67e1 100644 --- a/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs +++ b/meng_yao/Assets/script/A_Fight/json/Mengyao_Skill_Date.cs @@ -42,4 +42,6 @@ public class SkillLevelData public float DamageOfBig = 0f;//对大型敌人加成 public float DamageOfMin = 0f;//对小型型敌人加成 public float DamageOfSlow = 0f;//对减速敌人加成 + + }