UI调整
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
RegisterFunctionsToAnimSc();
|
||||
if(!player.inputSc.IsMoving) PlayTargetedAnimation("Equip");
|
||||
viewObjects["Wand"].SetFadeAnim(0.5f);
|
||||
PlayerCanvas.MainWeaponUIArea.displayer.SetFrameOutline(1);
|
||||
//PlayerCanvas.MainWeaponUIArea.displayer.SetFrameOutline(1);
|
||||
}
|
||||
|
||||
public override void OnPrimaryPress()
|
||||
|
||||
@@ -4,6 +4,7 @@ using Cielonos.MainGame.Buffs.Character;
|
||||
using Cielonos.MainGame.Characters;
|
||||
using Cielonos.MainGame.Effects.Feedback;
|
||||
using Cielonos.MainGame.UI;
|
||||
using SLSUtilities.Feedback;
|
||||
using SLSUtilities.General;
|
||||
using SLSUtilities.FunctionalAnimation;
|
||||
using SLSUtilities.WwiseAssistance;
|
||||
@@ -51,8 +52,6 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
viewObjects["Katana"].SetFadeAnim(0.2f);
|
||||
viewObjects["Saya"].SetFadeAnim(0.2f);
|
||||
|
||||
PlayerCanvas.MainWeaponUIArea.displayer.SetFrameOutline(0.4f);
|
||||
|
||||
PlayTargetedAnimation("EquipBlock");
|
||||
SetBlock(equipBlockData);
|
||||
player.selfTimeSm.AddLocalTimer(0.4f, () =>
|
||||
@@ -105,7 +104,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.inputSc.IsHoldingSpecialA && functionSm["LightAttack"].IsAvailable())
|
||||
/*if (player.inputSc.IsHoldingSpecialA && functionSm["LightAttack"].IsAvailable())
|
||||
{
|
||||
CharacterBase target = CombatManager.EnemySm.GetBestEnemy(5);
|
||||
if (PlayTargetedAnimation("AttackRC", target, 1f, true))
|
||||
@@ -114,7 +113,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
functionSm["LightAttack"].Execute();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (player.landMovementSc.isSprinting && functionSm["LightAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
|
||||
{
|
||||
@@ -153,30 +152,48 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
}
|
||||
|
||||
List<Enemy> availableEnemies = CombatManager.EnemySm.GetEnemiesInRadius(player.transform.position, 4);
|
||||
|
||||
//完美格挡+反击
|
||||
if (player.reactionSc.blockSm.afterPerfectBlockTimer > 0)
|
||||
BlockSubmodule blockSm = player.reactionSc.blockSm;
|
||||
if (!blockSm.afterPerfectBlockTimer.isCompleted)
|
||||
{
|
||||
Enemy target = CombatManager.EnemySm.GetBestEnemy(availableEnemies);
|
||||
if (PlayTargetedAnimation("BlockParryAttack", target))
|
||||
Enemy blockedTarget = blockSm.perfectBlockedTarget as Enemy;
|
||||
bool successPlayed;
|
||||
if (blockedTarget != null && !availableEnemies.Contains(blockedTarget))
|
||||
{
|
||||
player.reactionSc.blockSm.afterPerfectBlockTimer = 0;
|
||||
RemoveBlock();
|
||||
Debug.Log(blockedTarget.name);
|
||||
float distance = Vector3.Distance(player.transform.position.Flatten(), blockedTarget.transform.position.Flatten());
|
||||
successPlayed = PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", blockedTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
successPlayed = PlayTargetedAnimation("BlockParryAttack");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//完美闪避+反击
|
||||
if (player.reactionSc.dodgeSm.afterPerfectDodgeTimer > 0)
|
||||
{
|
||||
CharacterBase target = CombatManager.EnemySm.GetBestEnemy(12);
|
||||
if (PlayTargetedAnimation("DodgeParryAttack", target))
|
||||
if(successPlayed)
|
||||
{
|
||||
player.reactionSc.dodgeSm.afterPerfectDodgeTimer = 0;
|
||||
blockSm.afterPerfectBlockTimer.Complete();
|
||||
RemoveBlock();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
DodgeSubmodule dodgeSm = player.reactionSc.dodgeSm;
|
||||
if (!dodgeSm.afterPerfectDodgeTimer.isCompleted)
|
||||
{
|
||||
Enemy dodgedTarget = dodgeSm.perfectDodgedTarget as Enemy;
|
||||
bool successPlayed;
|
||||
if (dodgedTarget != null && !availableEnemies.Contains(dodgedTarget))
|
||||
{
|
||||
float distance = Vector3.Distance(player.transform.position.Flatten(), dodgedTarget.transform.position.Flatten());
|
||||
successPlayed = PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", dodgedTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
successPlayed = PlayTargetedAnimation("BlockParryAttack");
|
||||
}
|
||||
|
||||
if(successPlayed)
|
||||
{
|
||||
dodgeSm.afterPerfectDodgeTimer.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
if (player.reactionSc.blockSm.HaveBlockSource(blockData.blockName))
|
||||
@@ -202,46 +219,49 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.inputSc.IsHoldingSpecialA && functionSm["HeavyAttack"].IsAvailable())
|
||||
if (player.inputSc.IsHoldingSpecialA)
|
||||
{
|
||||
string suffix = techniqueScore switch
|
||||
if (functionSm["DisruptionAttack"].IsAvailable())
|
||||
{
|
||||
< 1f => "A",
|
||||
< 3f => "B",
|
||||
>= 3f => "C",
|
||||
_ => "A"
|
||||
};
|
||||
|
||||
List<Enemy> disruptable = CombatManager.EnemySm.GetDisruptableEnemies(availableEnemies);
|
||||
Enemy target = CombatManager.EnemySm.GetScoredEnemies(availableEnemies)
|
||||
.ApplyScoreModifier(disruptable, 0f, 1f).BestEnemy();
|
||||
|
||||
if (PlayTargetedAnimation("DisruptionAttack" + suffix, target))
|
||||
{
|
||||
if (disruptable.Count > 0)
|
||||
string suffix = techniqueScore switch
|
||||
{
|
||||
var timeScaleModifierClip = player.feedbackSc
|
||||
.GetFeedbackData("DisruptionStartup")
|
||||
.Clip<TimeScaleModifierAction>("Time");
|
||||
float duration = fullBodyFuncAnimSm.collection["DisruptionAttack" + suffix]
|
||||
.Interval(IntervalType.Startup).Duration * 2;
|
||||
|
||||
timeScaleModifierClip.duration = duration;
|
||||
player.feedbackSc.PlayFeedback("DisruptionStartup");
|
||||
}
|
||||
< 1f => "A",
|
||||
< 3f => "B",
|
||||
>= 3f => "C",
|
||||
_ => "A"
|
||||
};
|
||||
|
||||
if (suffix == "B")
|
||||
List<Enemy> disruptable = CombatManager.EnemySm.GetDisruptableEnemies(availableEnemies);
|
||||
Enemy target = CombatManager.EnemySm.GetScoredEnemies(availableEnemies)
|
||||
.ApplyScoreModifier(disruptable, 0f, 1f).BestEnemy();
|
||||
|
||||
if (PlayTargetedAnimation("DisruptionAttack" + suffix, target))
|
||||
{
|
||||
ModifyTechniqueScore(-1, false);
|
||||
if (disruptable.Count > 0)
|
||||
{
|
||||
FeedbackClip timeScaleModifierClip = player.feedbackSc.GetFeedbackData("DisruptionStartup")
|
||||
.Clip<TimeScaleModifierAction>("Time");
|
||||
float duration = fullBodyFuncAnimSm.collection["DisruptionAttack" + suffix]
|
||||
.Interval(IntervalType.Startup).Duration * 2;
|
||||
|
||||
timeScaleModifierClip.duration = duration;
|
||||
player.feedbackSc.PlayFeedback("DisruptionStartup");
|
||||
}
|
||||
|
||||
if (suffix == "B")
|
||||
{
|
||||
ModifyTechniqueScore(-1, false);
|
||||
}
|
||||
else if (suffix == "C")
|
||||
{
|
||||
ModifyTechniqueScore(-3, false);
|
||||
}
|
||||
|
||||
comboSm.main.Reset();
|
||||
functionSm["DisruptionAttack"].Execute();
|
||||
}
|
||||
else if (suffix == "C")
|
||||
{
|
||||
ModifyTechniqueScore(-3, false);
|
||||
}
|
||||
|
||||
comboSm.main.Reset();
|
||||
functionSm["HeavyAttack"].Execute();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -299,7 +319,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
player.operationSc.Dodge();
|
||||
DodgeSource defaultDodge = DodgeSource.Default(player);
|
||||
player.reactionSc.dodgeSm.ApplyDodge(defaultDodge);
|
||||
player.reactionSc.dodgeSm.GetCurrentDodgeSource().PerfectDodge();
|
||||
player.reactionSc.dodgeSm.GetCurrentDodgeSource().PerfectDodge(null);
|
||||
player.reactionSc.dodgeSm.RemoveDodge("DefaultDodge");
|
||||
}
|
||||
}
|
||||
@@ -372,17 +392,15 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
float magnitude = hitFeedback == "SingleNormalHit" ? 0.12f : 0.06f;
|
||||
positionShakeAction.amplitude = vfxData.Get(vfxName).slashScreenPosition.normalized * magnitude;
|
||||
feedbackSc.PlayFeedback(hitFeedback);
|
||||
|
||||
new ElectronicParalysis.Progress(100f).Apply(enemy, player, this);
|
||||
|
||||
ModifyTechniqueScore(0.02f);
|
||||
if (attackUnit.unitName == "InstantAttack")
|
||||
/*if (attackUnit.unitName == "InstantAttack")
|
||||
{
|
||||
if (enemy.buffSm.HasBuff<ElectronicParalysis>())
|
||||
{
|
||||
slash.attackSm.attackValue.damage *= 2f;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
});
|
||||
|
||||
return slash;
|
||||
@@ -391,11 +409,25 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
private NormalArea GenerateHeavySlash(string vfxName, AttackUnit attackUnit)
|
||||
{
|
||||
NormalArea slash = vfxData.SpawnVFX(vfxName, player).GetComponentInChildren<NormalArea>();
|
||||
|
||||
slash.Initialize<NormalArea>(player, this, Fraction.Enemy);
|
||||
|
||||
if (!HasExtender<PhotonDissociator>())
|
||||
{
|
||||
slash.SetAttackSubmodule<NormalArea>(attackUnit)
|
||||
.SetTimeSubmodule<NormalArea>(1f, 0.04f)
|
||||
.SetHitSubmodule<NormalArea>();
|
||||
}
|
||||
else // 如果有Photon Dissociator,重攻击拆分为五段,每段伤害为原来的30%,时间和判定也相应调整
|
||||
{
|
||||
AttackUnit modifiedUnit = attackUnit.Clone();
|
||||
modifiedUnit.startDamage *= 0.5f;
|
||||
|
||||
slash.SetAttackSubmodule<NormalArea>(modifiedUnit)
|
||||
.SetTimeSubmodule<NormalArea>(1f, 0.04f, 0.4f)
|
||||
.SetHitSubmodule<NormalArea>(0.1f, 3);
|
||||
}
|
||||
|
||||
slash.Initialize<NormalArea>(player, this, Fraction.Enemy)
|
||||
.SetAttackSubmodule<NormalArea>(attackUnit)
|
||||
.SetTimeSubmodule<NormalArea>(1f, 0.04f)
|
||||
.SetHitSubmodule<NormalArea>();
|
||||
slash.SetImpulseSubmodule(1f).WithRepulsion(5f);
|
||||
|
||||
slash.attackSm.breakthroughAction = (enemy, hitPosition) =>
|
||||
@@ -500,8 +532,6 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
if (attackArea is NormalArea)
|
||||
{
|
||||
ModifyTechniqueScore(-0.1f);
|
||||
//attackArea.creator.GetHit(Breakthrough.Type.Disruption, out _);
|
||||
//attackArea.creator.movementSc.impulseSm.ApplyKnockback(player.transform.forward, 5f);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -516,12 +546,15 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
new Vector3(0f, 4f, -2f);
|
||||
|
||||
feedbackSc.PlayFeedback("PerfectBlock");
|
||||
|
||||
|
||||
if (attackArea is NormalArea)
|
||||
{
|
||||
ModifyTechniqueScore(0.2f);
|
||||
//attackArea.creator.GetHit(Breakthrough.Type.Disruption, out _);
|
||||
//attackArea.creator.movementSc.impulseSm.ApplyKnockback(player.transform.forward, 5f);
|
||||
if (HasExtender<PhotonPolarizer>())
|
||||
{
|
||||
attackArea.creator.GetHit(Breakthrough.Type.Forced, out _);
|
||||
attackArea.creator.movementSc.impulseSm.ApplyKnockback(player.transform.forward, 6f);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user