Passion & UI
This commit is contained in:
@@ -6,13 +6,6 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
public class AudioSubcontroller : SubcontrollerBase<CharacterBase>
|
||||
{
|
||||
//public AudioContainer audioContainer;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
public void PlayFootStepSound(AnimationEvent animationEvent)
|
||||
{
|
||||
if (animationEvent.animatorClipInfo.weight > 0.5f)
|
||||
|
||||
@@ -168,18 +168,18 @@ namespace Cielonos.MainGame.Characters
|
||||
this.normalBlockEffect = data.normalBlockEffect;
|
||||
this.normalBlockSound = data.normalBlockSound;
|
||||
|
||||
this.triggerTime = 0.06f;
|
||||
this.triggerTime = 0f;
|
||||
}
|
||||
|
||||
public void PerfectBlock(AttackAreaBase attackArea, Vector3 blockEffectPosition)
|
||||
{
|
||||
if(triggerTime > 0f) return;
|
||||
triggerTime = 0.04f;
|
||||
triggerTime = 0.02f;
|
||||
|
||||
if (sourceItem != null)
|
||||
{
|
||||
AudioManager.Post(perfectBlockSound, sourceCharacter.gameObject);
|
||||
sourceItem.feedbackSc.PlayFeedback("PerfectBlock");
|
||||
sourceItem.feedbackSc?.PlayFeedback("PerfectBlock");
|
||||
}
|
||||
|
||||
VFXObject.Spawn(perfectBlockEffect, sourceCharacter, blockEffectPosition, Quaternion.identity);
|
||||
@@ -188,17 +188,18 @@ namespace Cielonos.MainGame.Characters
|
||||
BlockSubmodule blockSm = sourceCharacter.reactionSc.blockSm;
|
||||
blockSm.perfectBlockedTarget = attackArea.creator;
|
||||
blockSm.afterPerfectBlockTimer.Reset(blockBufferTime + 0.25f);
|
||||
Debug.Log($"[BlockSource] Perfect block triggered. Perfect block type: {perfectBlockType}, Block buffer time: {blockBufferTime}");
|
||||
}
|
||||
|
||||
public void NormalBlock(AttackAreaBase attackArea, Vector3 blockEffectPosition)
|
||||
{
|
||||
if (triggerTime > 0f) return;
|
||||
triggerTime = 0.04f;
|
||||
triggerTime = 0.02f;
|
||||
|
||||
if (sourceItem != null)
|
||||
{
|
||||
AudioManager.Post(normalBlockSound, sourceCharacter.gameObject);
|
||||
sourceItem.feedbackSc.PlayFeedback("NormalBlock");
|
||||
sourceItem.feedbackSc?.PlayFeedback("NormalBlock");
|
||||
}
|
||||
|
||||
VFXObject.Spawn(normalBlockEffect, sourceCharacter, blockEffectPosition, Quaternion.identity);
|
||||
@@ -207,6 +208,7 @@ namespace Cielonos.MainGame.Characters
|
||||
BlockSubmodule blockSm = sourceCharacter.reactionSc.blockSm;
|
||||
blockSm.normalBlockedTarget = attackArea.creator;
|
||||
blockSm.afterPerfectBlockTimer.Reset(blockBufferTime + 0.25f);
|
||||
Debug.Log($"[BlockSource] Normal block triggered. Normal block type: {normalBlockType}, Block buffer time: {blockBufferTime}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ namespace Cielonos.MainGame.Characters
|
||||
public static DodgeSource Default(CharacterBase sourceCharacter, float duration = Mathf.Infinity)
|
||||
{
|
||||
DodgeSource defaultDodge = new DodgeSource(sourceCharacter, null,
|
||||
"DefaultDodge", 0, "NormalDodge", "PerfectDodge", duration, 0.2f);
|
||||
"DefaultDodge", 0, "NormalDodge", "PerfectDodge", duration, 0.15f);
|
||||
if (sourceCharacter is Player player)
|
||||
{
|
||||
defaultDodge.onPerfectDodge = () =>
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Cielonos.MainGame
|
||||
/// 覆写播放核心:融入战斗专属的可播放性检测、前置打断清理及事件控制。
|
||||
/// </summary>
|
||||
public override bool Play(FuncAnimData funcAnimData, float animationSpeedMultiplier = 1f, float transitionDuration = 0.1f,
|
||||
bool isNormalizedTransition = false, List<FuncAnimPayloadBase> runtimeStartEvents = null)
|
||||
bool isNormalizedTransition = false, float normalizedStartTime = -1f, List<FuncAnimPayloadBase> runtimeStartEvents = null)
|
||||
{
|
||||
var newRtFuncAnim = new RuntimeFuncAnim(funcAnimData, Executor);
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace Cielonos.MainGame
|
||||
float finalSpeedMultiplier = funcAnimData.animInfo.isAffectedBySpeedMultiplier ? animationSpeedMultiplier : 1f;
|
||||
|
||||
// 4. 委派底层物理播放器执行 CrossFade 过渡与启动
|
||||
bool playSuccess = base.Play(funcAnimData, finalSpeedMultiplier, transitionDuration, isNormalizedTransition, runtimeStartEvents);
|
||||
bool playSuccess = base.Play(funcAnimData, finalSpeedMultiplier, transitionDuration, isNormalizedTransition, normalizedStartTime, runtimeStartEvents);
|
||||
|
||||
if (playSuccess)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user