Passion & UI
This commit is contained in:
@@ -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 = () =>
|
||||
|
||||
Reference in New Issue
Block a user