Merge branch 'main' of http://shu.sheziwanglo.cn:3000/shurongsen/Cute_demon_attacks
This commit is contained in:
commit
e9a9cd6509
@ -614,7 +614,7 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 5a21d33cca7048a46aed91d4e3e32ec3, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: aa6f66265746cb041bbfdf887abe64f9, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
@ -637,6 +637,7 @@ GameObject:
|
||||
- component: {fileID: 4205844203331515742}
|
||||
- component: {fileID: 9162732182785843388}
|
||||
- component: {fileID: 8475889323091750017}
|
||||
- component: {fileID: 7780224884041102910}
|
||||
m_Layer: 5
|
||||
m_Name: myCanva
|
||||
m_TagString: Untagged
|
||||
@ -728,6 +729,17 @@ MonoBehaviour:
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!210 &7780224884041102910
|
||||
SortingGroup:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6362446851701897971}
|
||||
m_Enabled: 1
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
--- !u!1 &7634432846538185418
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -562,8 +562,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: b8d04d25bab1a3541925d4cc205ad1d8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
role: {fileID: 8433650274028726420}
|
||||
fun: {fileID: 0}
|
||||
DamageUp: 1
|
||||
AttackRange: 1
|
||||
AttackCooldown: 1
|
||||
@ -571,3 +572,4 @@ MonoBehaviour:
|
||||
NumberOfBullets: 1
|
||||
SpeedOfBullets: 1
|
||||
CritRate: 1
|
||||
DamageOfSky: 1
|
||||
|
@ -396,6 +396,7 @@ GameObject:
|
||||
- component: {fileID: 8433650274028726420}
|
||||
- component: {fileID: -3836672401185760439}
|
||||
- component: {fileID: 1608620729910401442}
|
||||
- component: {fileID: 3258498600701209889}
|
||||
m_Layer: 0
|
||||
m_Name: mkl
|
||||
m_TagString: Player
|
||||
@ -528,3 +529,30 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
tower: {fileID: 0}
|
||||
Tag: tower
|
||||
--- !u!114 &3258498600701209889
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8433650275485930554}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: cf06a056a8f837740a4fca76de3a5ed5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
role: {fileID: 8433650274028726420}
|
||||
DamageUp: 0
|
||||
AttackRange: 0
|
||||
AttackCooldown: 0
|
||||
AttackDuration: 0
|
||||
NumberOfBullets: 0
|
||||
SpeedOfBullets: 0
|
||||
CriticalRate: 0
|
||||
CriticalDamage: 0
|
||||
DamageOfSky: 0
|
||||
DamageOfland: 0
|
||||
DamageOfBig: 0
|
||||
DamageOfMin: 0
|
||||
|
@ -396,6 +396,7 @@ GameObject:
|
||||
- component: {fileID: 8433650274028726420}
|
||||
- component: {fileID: -3836672401185760439}
|
||||
- component: {fileID: 1608620729910401442}
|
||||
- component: {fileID: 206052671066122143}
|
||||
m_Layer: 0
|
||||
m_Name: qi_e
|
||||
m_TagString: Player
|
||||
@ -449,6 +450,7 @@ MonoBehaviour:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
id: M_S_001
|
||||
Name:
|
||||
camp: 0
|
||||
hp: 100
|
||||
dieIndex: -1
|
||||
@ -458,6 +460,15 @@ MonoBehaviour:
|
||||
_Canvas: {fileID: 0}
|
||||
spriteRenderers: {fileID: 0}
|
||||
HurtDirectin: 0
|
||||
Quality:
|
||||
Elements:
|
||||
Info:
|
||||
SkillId:
|
||||
AttackType:
|
||||
AttackActionType:
|
||||
AttackCD: 0
|
||||
CritRate: 0
|
||||
CriticalHitRateBonus: 0
|
||||
gold: 10
|
||||
MaxAttack: 10
|
||||
MinAttack: 10
|
||||
@ -518,3 +529,30 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
tower: {fileID: 0}
|
||||
Tag: tower
|
||||
--- !u!114 &206052671066122143
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8433650275485930554}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0f2e2ca90067ba742b2ebdc8e467e4bd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
role: {fileID: 8433650274028726420}
|
||||
DamageUp: 0
|
||||
AttackRange: 0
|
||||
AttackCooldown: 0
|
||||
AttackDuration: 0
|
||||
NumberOfBullets: 0
|
||||
SpeedOfBullets: 0
|
||||
CriticalRate: 0
|
||||
CriticalDamage: 0
|
||||
DamageOfSky: 0
|
||||
DamageOfland: 0
|
||||
DamageOfBig: 0
|
||||
DamageOfMin: 0
|
||||
|
@ -158,6 +158,8 @@ MonoBehaviour:
|
||||
role: {fileID: 8433650274028726420}
|
||||
panelPrefab: {fileID: 8782491854383104488, guid: 61ffa7d22a51b1e48a3495af66e30de0, type: 3}
|
||||
attackRange: {fileID: 681042887138380540}
|
||||
isShowPanel: 0
|
||||
instantiatedPanel: {fileID: 0}
|
||||
--- !u!1 &6070656209494785206
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -363,6 +365,7 @@ MonoBehaviour:
|
||||
animator: {fileID: 9037670100243302216}
|
||||
fireAni: {fileID: 0}
|
||||
BulletStartPos: {fileID: 2562350995381512747}
|
||||
AttackSpeed: 1
|
||||
direction: {x: 0, y: 0}
|
||||
--- !u!58 &1338343970434073545
|
||||
CircleCollider2D:
|
||||
@ -446,6 +449,7 @@ MonoBehaviour:
|
||||
retbutton: {fileID: 0}
|
||||
ClosureObj: {fileID: 0}
|
||||
id: 0
|
||||
Name:
|
||||
camp: 0
|
||||
hp: 100
|
||||
dieIndex: -1
|
||||
@ -455,7 +459,18 @@ MonoBehaviour:
|
||||
_Canvas: {fileID: 0}
|
||||
spriteRenderers: {fileID: 0}
|
||||
HurtDirectin: 0
|
||||
Quality:
|
||||
Elements:
|
||||
Info:
|
||||
SkillId:
|
||||
AttackType:
|
||||
AttackActionType:
|
||||
AttackCD: 0
|
||||
CritRate: 0
|
||||
CriticalHitRateBonus: 0
|
||||
gold: 10
|
||||
MaxAttack: 10
|
||||
MinAttack: 10
|
||||
physicalArmor: 10
|
||||
magicArmor: 5
|
||||
Navigation: {fileID: 0}
|
||||
@ -467,6 +482,9 @@ MonoBehaviour:
|
||||
mycollider: {fileID: 1338343970434073545}
|
||||
attackClass: {fileID: 7276635428522831207}
|
||||
CurrentIndex: 0
|
||||
hitIndex: 2
|
||||
normalIndex: 0
|
||||
isHit: 0
|
||||
enemyId:
|
||||
moveSpeed: 0
|
||||
harmNumber: 0
|
||||
|
@ -7,15 +7,19 @@ public class SkillUp : Fun
|
||||
{
|
||||
[Header("基类")] public Role role;
|
||||
|
||||
[Header("攻击伤害加成倍数")] public float DamageUp=1f;
|
||||
[Header("攻击范围加成倍数")] public float AttackRange = 1f;
|
||||
[Header("攻击冷却加成倍速")] public float AttackCooldown = 1f;
|
||||
[Header("攻击持续时间加成倍速")] public float AttackDuration = 1f;
|
||||
[Header("攻击子弹数量加成倍速")] public int NumberOfBullets = 1;
|
||||
[Header("攻击子弹速度加成倍速")] public float SpeedOfBullets = 1f;
|
||||
[Header("暴击率倍率加成")]public float CritRate = 1f;
|
||||
[Header("攻击伤害加成")] public float DamageUp=0f;
|
||||
[Header("攻击范围加成")] public float AttackRange = 0f;
|
||||
[Header("攻击冷却加成")] public float AttackCooldown = 0f;
|
||||
[Header("攻击持续时间加成")] public float AttackDuration = 0f;
|
||||
[Header("攻击子弹数量加成")] public int NumberOfBullets = 0;
|
||||
[Header("攻击子弹速度加成")] public float SpeedOfBullets = 0f;
|
||||
[Header("暴击率倍率加成")]public float CriticalRate = 0f;
|
||||
[Header("暴击伤害倍率加成")]public float CriticalDamage = 0f;
|
||||
|
||||
[Header("对空伤害加成")] public float DamageOfSky = 1f;
|
||||
[Header("对空伤害加成")] public float DamageOfSky = 0f;
|
||||
[Header("对地伤害加成")] public float DamageOfland = 0f;
|
||||
[Header("对大型敌人加成")] public float DamageOfBig = 0f;
|
||||
[Header("对小型型敌人加成")] public float DamageOfMin = 0f;
|
||||
|
||||
// 存储技能加成效果
|
||||
private Dictionary<string, Dictionary<int, System.Action>> skillUpgrades = new Dictionary<string, Dictionary<int, System.Action>>();
|
||||
|
@ -12,7 +12,7 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_1()
|
||||
{
|
||||
base.AttackRange *= 2;
|
||||
base.AttackRange += 2;
|
||||
Debug.LogError("使用技能1-1");
|
||||
}
|
||||
/// <summary>
|
||||
@ -20,7 +20,7 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_3()
|
||||
{
|
||||
base.AttackRange *= 0.75f;
|
||||
base.AttackRange += -1;
|
||||
// 创建一个眩晕 Buff(持续1秒,20%概率)
|
||||
Action<Role> decelerationBuff = CreateDecelerationBuff(1f, 0.2f);
|
||||
|
||||
@ -33,8 +33,8 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_5()
|
||||
{
|
||||
base.AttackCooldown *= 2;
|
||||
base.AttackDuration *= 0.5f;
|
||||
base.AttackCooldown += -0.5f;
|
||||
base.AttackDuration += -0.5f;
|
||||
|
||||
Debug.LogError("使用技能1-5");
|
||||
}
|
||||
@ -45,7 +45,8 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_1()
|
||||
{
|
||||
base.NumberOfBullets *= 3;
|
||||
base.NumberOfBullets += 3;
|
||||
base.DamageUp += -0.5f;
|
||||
Debug.LogError("使用技能2-1");
|
||||
}
|
||||
/// <summary>
|
||||
@ -53,7 +54,7 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_3()
|
||||
{
|
||||
base.AttackCooldown *= 0.95f;
|
||||
base.AttackCooldown += 0.05f;
|
||||
//buff
|
||||
Action<Role> decelerationBuff = CreateSlowDownBuff(0.2f, 3f);
|
||||
// 将 Buff 添加到玩家的 storageBuff 列表中
|
||||
@ -65,8 +66,8 @@ public class laohuSkillUp :SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_5()
|
||||
{
|
||||
base.AttackCooldown *= 0.7f;
|
||||
base.AttackDuration *= 1.5f;
|
||||
base.AttackCooldown += 0.3f;
|
||||
base.AttackDuration += 0.5f;
|
||||
Debug.LogError("使用技能2-5");
|
||||
}
|
||||
}
|
||||
|
@ -9,21 +9,23 @@ public class mkl_SkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_1()
|
||||
{
|
||||
base.AttackCooldown *= 0.75f;
|
||||
base.AttackCooldown += -0.25f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 子弹飞行速度增加30%。攻击CD增加5%
|
||||
/// </summary>
|
||||
public override void Skill_1_3()
|
||||
{
|
||||
base.SpeedOfBullets *= 1.3f;
|
||||
base.SpeedOfBullets = 0.3f;
|
||||
AttackCooldown += 0.05f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 攻击增加20%暴击率 。攻击CD增加5%
|
||||
/// </summary>
|
||||
public override void Skill_1_5()
|
||||
{
|
||||
base.AttackCooldown *= 1.05f;
|
||||
base.AttackCooldown += 0.05f;
|
||||
base.DamageUp += 0.2f;
|
||||
}
|
||||
|
||||
|
||||
@ -32,21 +34,22 @@ public class mkl_SkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_1()
|
||||
{
|
||||
|
||||
base.DamageOfMin += 0.25f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 对小型敌人增加40%伤害。 攻击CD增加5%
|
||||
/// </summary>
|
||||
public override void Skill_2_3()
|
||||
{
|
||||
|
||||
//buff
|
||||
base.DamageOfMin += 0.4f;
|
||||
base.AttackCooldown += 0.5f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 每次攻击增加20%暴击率。射程减少1格
|
||||
/// </summary>
|
||||
public override void Skill_2_5()
|
||||
{
|
||||
|
||||
CriticalRate += 0.2f;
|
||||
AttackRange += -1;
|
||||
}
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ public class qieSkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_1_1()
|
||||
{
|
||||
base.AttackCooldown *= 0.75f;
|
||||
base.AttackCooldown += -0.25f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 增加子弹20%飞行速度。射程减少1格
|
||||
/// </summary>
|
||||
public override void Skill_1_3()
|
||||
{
|
||||
base.SpeedOfBullets *= 1.2f;
|
||||
base.AttackRange *= 0.5f;
|
||||
base.SpeedOfBullets += 0.2f;
|
||||
base.AttackRange += -1;
|
||||
}
|
||||
/// <summary>
|
||||
/// 对处于减速的敌人造成额外30%伤害。 攻击CD增加5%
|
||||
/// </summary>
|
||||
public override void Skill_1_5()
|
||||
{
|
||||
base.AttackCooldown *= 1.05f;
|
||||
|
||||
base.AttackCooldown += 0.05f;
|
||||
base.DamageUp += 0.3f;
|
||||
}
|
||||
|
||||
|
||||
@ -34,21 +34,21 @@ public class qieSkillUp : SkillUp
|
||||
/// </summary>
|
||||
public override void Skill_2_1()
|
||||
{
|
||||
base.DamageOfSky *= 1.25f;
|
||||
base.DamageOfSky += 0.25f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 攻击CD减少10%
|
||||
/// </summary>
|
||||
public override void Skill_2_3()
|
||||
{
|
||||
base.AttackCooldown *= 0.75f;
|
||||
//buff
|
||||
base.AttackCooldown += 0.75f;
|
||||
}
|
||||
/// <summary>
|
||||
/// 对小型敌人增加25%伤害。射程减少1格
|
||||
/// </summary>
|
||||
public override void Skill_2_5()
|
||||
{
|
||||
|
||||
DamageOfMin += 0.25f;
|
||||
AttackRange += -1;
|
||||
}
|
||||
}
|
||||
|
@ -89,14 +89,14 @@ public class SpawnPool : Base
|
||||
}
|
||||
public void UpdateNodeList()
|
||||
{
|
||||
// 获取所有带有 SortingGroup 组件的物体
|
||||
// 获取所有带有 SortingGroup 组件的敌人对象
|
||||
List<GameObject> gameObjectsList = new List<GameObject>();
|
||||
|
||||
foreach (GameObject go in Enemys)
|
||||
{
|
||||
// 获取该物体上的 SortingGroup 组件
|
||||
SortingGroup sortingGroup = go.GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null&&go.activeSelf)
|
||||
if (sortingGroup != null && go.activeSelf)
|
||||
{
|
||||
// 添加到列表中
|
||||
gameObjectsList.Add(go);
|
||||
@ -106,19 +106,28 @@ public class SpawnPool : Base
|
||||
// 按照 y 轴排序
|
||||
gameObjectsList.Sort((a, b) => a.transform.position.y.CompareTo(b.transform.position.y));
|
||||
|
||||
// 设置 SortingGroup 的 sortingOrder
|
||||
// 设置 SortingGroup 和子 Canvas 的 sortingOrder
|
||||
for (int i = 0; i < gameObjectsList.Count; i++)
|
||||
{
|
||||
SortingGroup sortingGroup = gameObjectsList[i].GetComponent<SortingGroup>();
|
||||
if (sortingGroup != null)
|
||||
{
|
||||
// 设置 sortingOrder 来决定显示的层级
|
||||
sortingGroup.sortingOrder = gameObjectsList.Count - i+2;
|
||||
// 计算排序顺序
|
||||
int order = gameObjectsList.Count - i + 2;
|
||||
sortingGroup.sortingOrder = order;
|
||||
|
||||
// 获取子 Canvas 并设置其 sortingOrder
|
||||
Canvas canvas = gameObjectsList[i].GetComponentInChildren<Canvas>();
|
||||
if (canvas != null)
|
||||
{
|
||||
canvas.sortingOrder = order;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (IsStartGet)
|
||||
|
@ -84,7 +84,7 @@ public class cardContorl : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndD
|
||||
|
||||
|
||||
MengyaoInfo.Instance.mengyaoIdToRole.Add(mY.GetComponent<Role>().id, mY);
|
||||
|
||||
SpawnPool.intance.Enemys.Add(mY);//存入图层排序的数组
|
||||
this.enabled = false;
|
||||
cardBox.instance.ChangeInPlaceNumber(1);
|
||||
mask.SetActive(true);
|
||||
|
Loading…
Reference in New Issue
Block a user