From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Battle/Skill/SkillBase.cs | 104 +++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 87 insertions(+), 17 deletions(-)
diff --git a/Main/System/Battle/Skill/SkillBase.cs b/Main/System/Battle/Skill/SkillBase.cs
index a42d02f..b8c46b5 100644
--- a/Main/System/Battle/Skill/SkillBase.cs
+++ b/Main/System/Battle/Skill/SkillBase.cs
@@ -9,6 +9,13 @@
{
const float moveTime = 0.5f;
+ private static readonly Color colorGreen = new Color(33f / 255f,
+ 133f / 255f,
+ 6f / 255f);
+ private static readonly Color colorBlue = new Color(40f / 255f,
+ 87f / 255f,
+ 189f / 255f);
+
protected SkillEffect skillEffect;
protected HB427_tagSCUseSkill tagUseSkillAttack;
public SkillConfig skillConfig;
@@ -23,6 +30,8 @@
protected bool moveFinished = false;
public int fromSkillId;
public bool isPlay = false;
+
+ private float MoveSpeed = 750f;
private Dictionary<int, BattleDrops> tempDropList = new Dictionary<int, BattleDrops>();
private Dictionary<int, HB422_tagMCTurnFightObjDead> tempDeadPackList = new Dictionary<int, HB422_tagMCTurnFightObjDead>();
@@ -76,6 +85,44 @@
}
}
+ protected void ShadowIllutionCreate(bool create)
+ {
+ if (create)
+ {
+ Color color = Color.white;
+ //1-杩炲嚮锛�2-鍙嶅嚮锛�3-杩藉嚮
+ // 鍙嶅嚮钃濊壊
+ // 杩藉嚮杩炲嚮缁胯壊
+ bool change = false;
+ if (tagUseSkillAttack.BattleType == 1)
+ {
+ color = colorGreen;
+ change = true;
+ }
+ else if (tagUseSkillAttack.BattleType == 2)
+ {
+ color = colorBlue;
+ change = true;
+ }
+ else if (tagUseSkillAttack.BattleType == 3)
+ {
+ color = colorGreen;
+ change = true;
+ }
+
+ if (change)
+ {
+ MoveSpeed = 1125f;
+ caster.motionBase.ShowIllusionShadow(true, color);
+ }
+ }
+ else
+ {
+ MoveSpeed = 750f;
+ caster.motionBase.ShowIllusionShadow(false);
+ }
+ }
+
// 鎶�鑳介噴鏀句富閫昏緫锛氬箍鎾簨浠躲�侀珮浜洰鏍囥�佹墽琛岄噴鏀�
public virtual void Cast()
{
@@ -103,7 +150,8 @@
if (hintConfig != null)
{
- caster.heroInfoBar.ShowTips(((char)hintConfig.prefix).ToString(), true);
+ caster.heroInfoBar.ShowTips(((char)hintConfig.prefix).ToString(), true, false, 1.25f);
+ // Debug.Break();
}
}
@@ -148,7 +196,12 @@
RectTransform target = battleField.GetTeamNode(caster.GetEnemyCamp(), skillConfig);
ExecuteMoveAndCastSequence(target, () =>
{
- MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, OnAttackFinish, 750F);
+ // ShadowIllutionCreate(true);
+ MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, () =>
+ {
+ // ShadowIllutionCreate(false);
+ OnAttackFinish();
+ }, MoveSpeed);
});
}
@@ -169,7 +222,12 @@
ExecuteMoveAndCastSequence(targetTrans, () =>
{
RectTransform rectTransform = battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum);
- MoveToTarget(rectTransform, Vector2.zero, OnAttackFinish, 750F);
+ // ShadowIllutionCreate(true);
+ MoveToTarget(rectTransform, Vector2.zero, () =>
+ {
+ // ShadowIllutionCreate(false);
+ OnAttackFinish();
+ }, MoveSpeed);
});
}
@@ -179,17 +237,24 @@
RectTransform target = battleField.GetTeamNode(caster.Camp, skillConfig);
ExecuteMoveAndCastSequence(target, () =>
{
- MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, OnAttackFinish, 750F);
+ // ShadowIllutionCreate(true);
+ MoveToTarget(battleField.GetTeamNode(caster.Camp, caster.teamHero.positionNum), Vector2.zero, () =>
+ {
+ // ShadowIllutionCreate(false);
+ OnAttackFinish();
+ }, MoveSpeed);
});
}
// 鎵ц绉诲姩-鏂芥硶-杩斿洖搴忓垪锛氶�氱敤鐨勭Щ鍔ㄦ敾鍑绘祦绋�
private void ExecuteMoveAndCastSequence(RectTransform target, Action onReturnComplete)
{
+ ShadowIllutionCreate(true);
MoveToTarget(target, new Vector2(skillConfig.CastDistance, 0), () =>
{
TurnBack(() =>
{
+ ShadowIllutionCreate(false);
CastImpl(() =>
{
TurnBack(() =>
@@ -210,7 +275,7 @@
}
// 绉诲姩鍒扮洰鏍囦綅缃細澶勭悊瑙掕壊鐨勭Щ鍔ㄥ姩鐢诲拰閫昏緫
- protected void MoveToTarget(RectTransform target, Vector2 offset, Action _onComplete = null, float speed = 500f)
+ protected void MoveToTarget(RectTransform target, Vector2 offset, Action _onComplete = null, float speed = 750f)
{
if (skillConfig.CastDistance >= 9999)
{
@@ -344,7 +409,7 @@
}
battleField.battleRootNode.skillMaskNode.SetActive(true);
- battleField.battleRootNode.SetSortingOrder();
+ // battleField.battleRootNode.SetSortingOrder();
}
// 鍛戒腑鐩爣鍥炶皟锛氬鐞嗘墍鏈夎鍛戒腑鐨勭洰鏍�
@@ -645,8 +710,8 @@
public void OnSkillFinished()
{
// 淇锛氫娇鐢ㄥ惊鐜唬鏇块�掑綊锛岄伩鍏嶆爤婧㈠嚭椋庨櫓
- try
- {
+ // try
+ // {
while (true)
{
// 楠岃瘉鎶�鑳芥晥鏋滄槸鍚﹀畬鎴�
@@ -698,17 +763,22 @@
}
if (pack is CustomB421ActionPack actionPack)
+ {
actionPack.Distribute();
- PackageRegedit.Distribute(pack);
+ }
+ else
+ {
+ PackageRegedit.Distribute(pack);
+ }
}
- }
- catch (Exception ex)
- {
- Debug.LogError($"OnSkillFinished寮傚父: {ex.Message}锛屾妧鑳絀D={skillConfig.SkillID}");
- // 纭繚鐘舵�佷竴鑷存�э紝鍗充娇鍑虹幇寮傚父涔熻鏍囪瀹屾垚
- isFinished = true;
- throw; // 閲嶆柊鎶涘嚭寮傚父渚涗笂灞傚鐞�
- }
+ // }
+ // catch (Exception ex)
+ // {
+ // Debug.LogError($"OnSkillFinished寮傚父: {ex.Message}锛屾妧鑳絀D={skillConfig.SkillID}");
+ // // 纭繚鐘舵�佷竴鑷存�э紝鍗充娇鍑虹幇寮傚父涔熻鏍囪瀹屾垚
+ // isFinished = true;
+ // throw; // 閲嶆柊鎶涘嚭寮傚父渚涗笂灞傚鐞�
+ // }
isFinished = true;
}
--
Gitblit v1.8.0