根据提供的code differences信息,我发现没有具体的代码变更内容。因此生成一个通用的commit message:
``` chore(config): 更新配置文件 移除不必要的配置项并优化项目设置 ``` 注意:由于未提供具体的代码差异信息,此提交消息为占位符。 请提供实际的代码变更详情以生成准确的提交消息。
This commit is contained in:
1 parent
84d0a510bb
commit
5cd7a93c4a
90 files changed
+7718
-5860
No files matched your search
@@ -0,0 +1,46 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class EliteSoldierSkill : UnitSkill
|
||||
{
|
||||
[Header("蓄力重斩参数")]
|
||||
[Min(0f)]
|
||||
public float skillDamage = 125f;
|
||||
|
||||
[Min(0.1f)]
|
||||
public float skillRadius = 2.5f;
|
||||
|
||||
[Header("技能动画")]
|
||||
[Min(0f)]
|
||||
public float skillAnimationDuration = 2.22f;
|
||||
|
||||
private bool isSkillReady;
|
||||
|
||||
public override void ReleaseSkill()
|
||||
{
|
||||
if (unit == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unit.FaceCurrentTarget(0f);
|
||||
isSkillReady = true;
|
||||
unit.PlaySkillAnimation(OnSkillFinished, skillAnimationDuration);
|
||||
}
|
||||
|
||||
// 添加到蓄力重斩动画的命中帧。
|
||||
public void OnSkillHit1()
|
||||
{
|
||||
if (!isSkillReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
unit.ApplyAreaSkillDamage(skillRadius, skillDamage, false);
|
||||
isSkillReady = false;
|
||||
}
|
||||
|
||||
private void OnSkillFinished()
|
||||
{
|
||||
isSkillReady = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: BnNJvSurVH7psIf+wcLfpozFZEpHdX+UGs+GERxCP4R4I4+WrcC0OW8=
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -24,6 +24,10 @@ public class UnitBase : MonoBehaviour
|
||||
[Header("模型朝向修正")]
|
||||
public float modelFacingOffset = 0f;
|
||||
|
||||
//是否保留动画根运动;需要攻击动作带动整体躯干时开启。
|
||||
[Header("动画根运动")]
|
||||
public bool useRootMotion = false;
|
||||
|
||||
//基础攻击力,实际伤害结算逻辑后续接入
|
||||
[Min(0f)]
|
||||
public float attackPower = 10f;
|
||||
@@ -130,8 +134,8 @@ public class UnitBase : MonoBehaviour
|
||||
statusEffectController = EnsureStatusEffectController();
|
||||
unitSkill = GetComponent<UnitSkill>();
|
||||
|
||||
// 位移和朝向由 CharacterController 与 UnitBase 控制,避免攻击动画的根运动叠加旋转。
|
||||
animator.applyRootMotion = false;
|
||||
// 大多数角色由 CharacterController 位移;特殊攻击动作可保留动画根运动。
|
||||
animator.applyRootMotion = useRootMotion;
|
||||
//记录初始坐标
|
||||
startPos = transform.position;
|
||||
randomTargetPos();
|
||||
|
||||
Reference in new issue
Block a user