diff --git a/meng_yao/Assets/common b/meng_yao/Assets/common index 291012539..50720f393 160000 --- a/meng_yao/Assets/common +++ b/meng_yao/Assets/common @@ -1 +1 @@ -Subproject commit 2910125393539e34101a4d133d4396395bc9cc8b +Subproject commit 50720f393c90b130c39161e96fba56d8fc085b8a diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs index 2b1b168e3..d05f99b93 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/SkillUp.cs @@ -15,6 +15,7 @@ public class SkillUp : Fun [Header("攻击子弹速度加成倍速")] public float SpeedOfBullets = 1f; [Header("暴击率倍率加成")]public float CritRate = 1f; + [Header("对空伤害加成")] public float DamageOfSky = 1f; // 存储技能加成效果 private Dictionary> skillUpgrades = new Dictionary>(); diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs index 4b5821881..9364d5ee8 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/laohuSkillUp.cs @@ -46,6 +46,7 @@ public class laohuSkillUp :SkillUp public override void Skill_2_1() { base.NumberOfBullets *= 3; + Debug.LogError("使用技能2-1"); } /// /// 降低敌人20%移动速度,攻击CD增加5% @@ -54,6 +55,10 @@ public class laohuSkillUp :SkillUp { base.AttackCooldown *= 0.95f; //buff + Action decelerationBuff = CreateSlowDownBuff(0.2f, 3f); + // 将 Buff 添加到玩家的 storageBuff 列表中 + role.AddBuff(role.storageBuff, decelerationBuff); + Debug.LogError("使用技能2-3"); } /// /// 喷火冷却时间增加30%,持续喷火时间增加50% @@ -62,5 +67,6 @@ public class laohuSkillUp :SkillUp { base.AttackCooldown *= 0.7f; base.AttackDuration *= 1.5f; + Debug.LogError("使用技能2-5"); } } diff --git a/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs b/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs index e4e9a4494..33a76b8d0 100644 --- a/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs +++ b/meng_yao/Assets/script/A_Fight/SkillUp/qieSkillUp.cs @@ -9,21 +9,22 @@ public class qieSkillUp : SkillUp /// public override void Skill_1_1() { - + base.AttackCooldown *= 0.75f; } /// /// 增加子弹20%飞行速度。射程减少1格 /// public override void Skill_1_3() { - - //buff + base.SpeedOfBullets *= 1.2f; + base.AttackRange *= 0.5f; } /// /// 对处于减速的敌人造成额外30%伤害。 攻击CD增加5% /// public override void Skill_1_5() { + base.AttackCooldown *= 1.05f; } @@ -33,14 +34,14 @@ public class qieSkillUp : SkillUp /// public override void Skill_2_1() { - + base.DamageOfSky *= 1.25f; } /// /// 攻击CD减少10% /// public override void Skill_2_3() { - + base.AttackCooldown *= 0.75f; //buff } /// diff --git a/meng_yao/Assets/script/A_Fight/SpawnPool.cs b/meng_yao/Assets/script/A_Fight/SpawnPool.cs index fce21318d..d9c1259f2 100644 --- a/meng_yao/Assets/script/A_Fight/SpawnPool.cs +++ b/meng_yao/Assets/script/A_Fight/SpawnPool.cs @@ -27,6 +27,7 @@ public class ObJPool { if (SurvivalPool.Contains(obj)) { + SurvivalPool.Remove(obj); DeathPool.Add(obj); } @@ -38,7 +39,7 @@ public class SpawnPool : Base public static SpawnPool intance; public ObJPool EnemyPool = new ObJPool(); - + public List Enemys = new List(); [Header("生成预制体")] public GameObject Prefab; @@ -91,11 +92,11 @@ public class SpawnPool : Base // 获取所有带有 SortingGroup 组件的物体 List gameObjectsList = new List(); - foreach (GameObject go in EnemyPool.SurvivalPool) + foreach (GameObject go in Enemys) { // 获取该物体上的 SortingGroup 组件 SortingGroup sortingGroup = go.GetComponent(); - if (sortingGroup != null) + if (sortingGroup != null&&go.activeSelf) { // 添加到列表中 gameObjectsList.Add(go); @@ -112,7 +113,7 @@ public class SpawnPool : Base if (sortingGroup != null) { // 设置 sortingOrder 来决定显示的层级 - sortingGroup.sortingOrder = gameObjectsList.Count - i; + sortingGroup.sortingOrder = gameObjectsList.Count - i+2; } } } @@ -194,8 +195,8 @@ public class SpawnPool : Base } enemy = Instantiate(Prefab); - EnemyPool.SurvivalPool.Add(enemy); - + //EnemyPool.SurvivalPool.Add(enemy); + Enemys.Add(enemy); } // 设置敌人的位置和其他属性 @@ -212,7 +213,7 @@ public class SpawnPool : Base { enemy.SetActive(false); // 禁用敌人对象 EnemyPool.Return(enemy); // 将敌人回收到池中 - + Enemys.Remove(enemy); deadNumber++; if (deadNumber>= GenerateQuantityMax) { diff --git a/meng_yao/Assets/script/A_Fight/enemy.cs b/meng_yao/Assets/script/A_Fight/enemy.cs index e87757c42..75462d6b7 100644 --- a/meng_yao/Assets/script/A_Fight/enemy.cs +++ b/meng_yao/Assets/script/A_Fight/enemy.cs @@ -74,7 +74,7 @@ public class enemy : Role } // 减速并在指定时间后恢复原速度 - public void SlowDown(float slowFactor, float duration) + public override void SlowDown(float slowFactor, float duration) { if (!isSlowed) { diff --git a/meng_yao/Assets/script/A_Fight/infobox_skill_up.cs b/meng_yao/Assets/script/A_Fight/infobox_skill_up.cs index f331fe60c..870109363 100644 --- a/meng_yao/Assets/script/A_Fight/infobox_skill_up.cs +++ b/meng_yao/Assets/script/A_Fight/infobox_skill_up.cs @@ -28,7 +28,6 @@ public class infobox_skill_up : MonoBehaviour void UpgradeCLick() { - if (Skillspend.levelNumber =0) { SkillBox.instance.UpdataExp(-Skillspend.spendNumber); diff --git a/meng_yao/Assets/script/serveTestScript/UserModule/playerInfo.cs b/meng_yao/Assets/script/serveTestScript/UserModule/playerInfo.cs index 13d5a7fdc..1515ff694 100644 --- a/meng_yao/Assets/script/serveTestScript/UserModule/playerInfo.cs +++ b/meng_yao/Assets/script/serveTestScript/UserModule/playerInfo.cs @@ -6,8 +6,6 @@ using UnityEngine; //用户详情 public class playerInfo : MonoBehaviour { - - public Dictionary CreateHeaders() { if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))