Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
587f8bf66c
@ -1 +1 @@
|
||||
Subproject commit 2910125393539e34101a4d133d4396395bc9cc8b
|
||||
Subproject commit 50720f393c90b130c39161e96fba56d8fc085b8a
|
@ -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<string, Dictionary<int, System.Action>> skillUpgrades = new Dictionary<string, Dictionary<int, System.Action>>();
|
||||
|
@ -46,6 +46,7 @@ public class laohuSkillUp :SkillUp
|
||||
public override void Skill_2_1()
|
||||
{
|
||||
base.NumberOfBullets *= 3;
|
||||
Debug.LogError("使用技能2-1");
|
||||
}
|
||||
/// <summary>
|
||||
/// 降低敌人20%移动速度,攻击CD增加5%
|
||||
@ -54,6 +55,10 @@ public class laohuSkillUp :SkillUp
|
||||
{
|
||||
base.AttackCooldown *= 0.95f;
|
||||
//buff
|
||||
Action<Role> decelerationBuff = CreateSlowDownBuff(0.2f, 3f);
|
||||
// 将 Buff 添加到玩家的 storageBuff 列表中
|
||||
role.AddBuff(role.storageBuff, decelerationBuff);
|
||||
Debug.LogError("使用技能2-3");
|
||||
}
|
||||
/// <summary>
|
||||
/// 喷火冷却时间增加30%,持续喷火时间增加50%
|
||||
@ -62,5 +67,6 @@ public class laohuSkillUp :SkillUp
|
||||
{
|
||||
base.AttackCooldown *= 0.7f;
|
||||
base.AttackDuration *= 1.5f;
|
||||
Debug.LogError("使用技能2-5");
|
||||
}
|
||||
}
|
||||
|
@ -9,21 +9,22 @@ public class qieSkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_1()
|
||||
{
|
||||
|
||||
base.AttackCooldown *= 0.75f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加子弹20%飞行速度。射程减少1格
|
||||
/// </summary>
|
||||
public override void Skill_1_3()
|
||||
{
|
||||
|
||||
//buff
|
||||
base.SpeedOfBullets *= 1.2f;
|
||||
base.AttackRange *= 0.5f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 对处于减速的敌人造成额外30%伤害。 攻击CD增加5%
|
||||
/// </summary>
|
||||
public override void Skill_1_5()
|
||||
{
|
||||
base.AttackCooldown *= 1.05f;
|
||||
|
||||
}
|
||||
|
||||
@ -33,14 +34,14 @@ public class qieSkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_1()
|
||||
{
|
||||
|
||||
base.DamageOfSky *= 1.25f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 攻击CD减少10%
|
||||
/// </summary>
|
||||
public override void Skill_2_3()
|
||||
{
|
||||
|
||||
base.AttackCooldown *= 0.75f;
|
||||
//buff
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -27,6 +27,7 @@ public class ObJPool<T>
|
||||
{
|
||||
if (SurvivalPool.Contains(obj))
|
||||
{
|
||||
|
||||
SurvivalPool.Remove(obj);
|
||||
DeathPool.Add(obj);
|
||||
}
|
||||
@ -38,7 +39,7 @@ public class SpawnPool : Base
|
||||
public static SpawnPool intance;
|
||||
|
||||
public ObJPool<GameObject> EnemyPool = new ObJPool<GameObject>();
|
||||
|
||||
public List<GameObject> Enemys = new List<GameObject>();
|
||||
|
||||
[Header("生成预制体")]
|
||||
public GameObject Prefab;
|
||||
@ -91,11 +92,11 @@ public class SpawnPool : Base
|
||||
// 获取所有带有 SortingGroup 组件的物体
|
||||
List<GameObject> gameObjectsList = new List<GameObject>();
|
||||
|
||||
foreach (GameObject go in EnemyPool.SurvivalPool)
|
||||
foreach (GameObject go in Enemys)
|
||||
{
|
||||
// 获取该物体上的 SortingGroup 组件
|
||||
SortingGroup sortingGroup = go.GetComponent<SortingGroup>();
|
||||
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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -28,7 +28,6 @@ public class infobox_skill_up : MonoBehaviour
|
||||
|
||||
void UpgradeCLick()
|
||||
{
|
||||
|
||||
if (Skillspend.levelNumber <Skillspend.Maxlevel && (SkillBox.instance.expList.Count - Skillspend.spendNumber)>=0)
|
||||
{
|
||||
SkillBox.instance.UpdataExp(-Skillspend.spendNumber);
|
||||
|
@ -6,8 +6,6 @@ using UnityEngine;
|
||||
//用户详情
|
||||
public class playerInfo : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
public Dictionary<string, string> CreateHeaders()
|
||||
{
|
||||
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
|
||||
|
Loading…
Reference in New Issue
Block a user