后处理+FEEL完全改进
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using Cielonos.MainGame.Characters;
|
||||
using Cielonos.MainGame.Characters.Buffs;
|
||||
using SLSFramework.General;
|
||||
using SLSUtilities.FunctionalAnimation;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Inventory
|
||||
@@ -110,7 +110,7 @@ namespace Cielonos.MainGame.Inventory
|
||||
fullBodyFuncAnimSm.Stop(DisruptionType.ForcedAction);
|
||||
}
|
||||
|
||||
RemoveBlock();
|
||||
player.selfTimeSm.AddLocalTimer(0.1f, RemoveBlock);
|
||||
player.movementSc.canMove.Modify(true);
|
||||
player.movementSc.canRotate.Modify(true);
|
||||
}
|
||||
@@ -118,22 +118,22 @@ namespace Cielonos.MainGame.Inventory
|
||||
|
||||
public partial class Polychrome
|
||||
{
|
||||
private void LightAttack0() => GenerateNormalSlash("LightAttack0", new Vector3(1f, 0.6f, 0).normalized * 0.1f);
|
||||
private void LightAttack1() => GenerateNormalSlash("LightAttack1", new Vector3(-1f, -0.6f, 0).normalized * 0.1f);
|
||||
private void LightAttack2() => GenerateNormalSlash("LightAttack2", new Vector3(-1f, 0.6f, 0).normalized * 0.1f);
|
||||
private void LightAttack3() => GenerateNormalSlash("LightAttack3", Vector3.right * 0.1f);
|
||||
private void TripleAttack_0() => GenerateFastSlash("TripleAttack_0", new Vector3(1f, 0.6f, 0).normalized * 0.2f);
|
||||
private void TripleAttack_1() => GenerateFastSlash("TripleAttack_1", new Vector3(-1f, -0.6f, 0).normalized * 0.2f);
|
||||
private void TripleAttack_2() => GenerateFastSlash("TripleAttack_2", Vector3.right * 0.2f);
|
||||
private void HeavyAttack() => GenerateHeavySlash("HeavyAttack", new Vector3(1f, 0.6f, 0).normalized * 0.4f);
|
||||
private void RunAttack() => GenerateMoveSlash("RunAttack", new Vector3(1f, 0.6f, 0).normalized * 0.1f, player.transform.forward * 10f);
|
||||
private void ParryAttack() => GenerateParrySlash("ParryAttack", new Vector3(-1f, -0.6f, 0).normalized * 0.4f);
|
||||
private void LightAttack0() => GenerateNormalSlash("LightAttack0", new Vector3(0.5f, 1f, 0));
|
||||
private void LightAttack1() => GenerateNormalSlash("LightAttack1", new Vector3(-0.5f, -1f, 0));
|
||||
private void LightAttack2() => GenerateNormalSlash("LightAttack2", new Vector3(0.8f, -1.2f, 0));
|
||||
private void LightAttack3() => GenerateNormalSlash("LightAttack3", new Vector3(0.5f, 1.5f, 0));
|
||||
private void TripleAttack_0() => GenerateFastSlash("TripleAttack_0", new Vector3(1f, 0.6f, 0));
|
||||
private void TripleAttack_1() => GenerateFastSlash("TripleAttack_1", new Vector3(-1f, -0.6f, 0));
|
||||
private void TripleAttack_2() => GenerateFastSlash("TripleAttack_2", Vector3.right);
|
||||
private void HeavyAttack() => GenerateHeavySlash("HeavyAttack", new Vector3(3, -2, -5));
|
||||
private void RunAttack() => GenerateMoveSlash("RunAttack", new Vector3(1f, 0.6f, 0), player.transform.forward * 10f);
|
||||
private void ParryAttack() => GenerateParrySlash("ParryAttack", new Vector3(5, 3, -8));
|
||||
private void DisruptAttack() => GenerateDisruptSlash("DisruptAttack", new Vector3(1f, 0, 0).normalized * 0.4f);
|
||||
}
|
||||
|
||||
public partial class Polychrome
|
||||
{
|
||||
private NormalArea GenerateNormalSlash(string vfxName, Vector3 swingForce)
|
||||
private NormalArea GenerateNormalSlash(string vfxName, Vector3 swingRotation)
|
||||
{
|
||||
NormalArea slash = vfxData.SpawnVFX(vfxName).GetComponentInChildren<NormalArea>();
|
||||
|
||||
@@ -148,12 +148,10 @@ namespace Cielonos.MainGame.Inventory
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["NormalHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
new ElectronicDisturbance(2).Apply(enemy);
|
||||
});
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("NormalSwing", "NormalSwing", swingRotation);
|
||||
|
||||
return slash;
|
||||
}
|
||||
@@ -168,13 +166,14 @@ namespace Cielonos.MainGame.Inventory
|
||||
.SetHitSubmodule<NormalArea>()
|
||||
.SetForceSubmodule<NormalArea>(3f, true);
|
||||
|
||||
|
||||
string hitFeedbackName = vfxName != "TripleAttack_2" ? "FastHitFirsts" : "FastHitFinal";
|
||||
|
||||
slash.hitSm
|
||||
.AddHitSound("NormalHit")
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["NormalHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
feedbackSc[hitFeedbackName].Play();
|
||||
new ElectronicDisturbance(2).Apply(enemy);
|
||||
|
||||
if (enemy.statusSm.HasStatus(StatusType.Incapacitation))
|
||||
@@ -183,33 +182,35 @@ namespace Cielonos.MainGame.Inventory
|
||||
}
|
||||
});
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("NormalSwing", "NormalSwing", swingForce);
|
||||
|
||||
return slash;
|
||||
}
|
||||
|
||||
private NormalArea GenerateHeavySlash(string vfxName, Vector3 swingForce)
|
||||
private NormalArea GenerateHeavySlash(string vfxName, Vector3 swingRotation)
|
||||
{
|
||||
NormalArea slash = vfxData.SpawnVFX(vfxName).GetComponentInChildren<NormalArea>();
|
||||
|
||||
slash.Initialize<NormalArea>(player, this, Fraction.Enemy)
|
||||
.SetAttackSubmodule<NormalArea>(attackData["HeavyAttack"])
|
||||
.SetTimeSubmodule<NormalArea>(1f, 0.04f, 0.16f)
|
||||
.SetHitSubmodule<NormalArea>()
|
||||
.SetTimeSubmodule<NormalArea>(1f, 0.04f, 0.2f)
|
||||
.SetHitSubmodule<NormalArea>(0.04f, 4)
|
||||
.SetForceSubmodule<NormalArea>(3f, true);
|
||||
|
||||
|
||||
slash.hitSm
|
||||
.AddHitSound("HeavyHit")
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["HeavyHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
player.viewSc.cameraDistance.currentValue -= 2f;
|
||||
feedbackSc["HeavyHitFirst"].Play();
|
||||
new ElectronicDisturbance(5).Apply(enemy);
|
||||
});
|
||||
}, 0)
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["HeavyHitFollows"].Play();
|
||||
new ElectronicDisturbance(5).Apply(enemy);
|
||||
}, 1, 2, 3);
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("HeavySwing", "HeavySwing", swingRotation);
|
||||
|
||||
return slash;
|
||||
}
|
||||
@@ -228,13 +229,18 @@ namespace Cielonos.MainGame.Inventory
|
||||
.AddHitSound("HeavyHit")
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["HeavyHit"].Play();
|
||||
feedbackSc["ParryHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
player.selfTimeSm.AddGlobalTimer(0.12f, () =>
|
||||
{
|
||||
player.selfTimeSm.ModifyTimeScale(0.2f, 0.3f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.2f, 0.3f);
|
||||
});
|
||||
new ElectronicDisturbance(5).Apply(enemy);
|
||||
});
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("HeavySwing", "HeavySwing", swingForce);
|
||||
|
||||
return slash;
|
||||
}
|
||||
@@ -253,13 +259,11 @@ namespace Cielonos.MainGame.Inventory
|
||||
.AddHitSound("HeavyHit")
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["HeavyHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.12f);
|
||||
feedbackSc["DisruptHit"].Play();
|
||||
new ElectronicDisturbance(5).Apply(enemy);
|
||||
});
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("HeavySwing", "HeavySwing", swingForce);
|
||||
|
||||
return slash;
|
||||
}
|
||||
@@ -280,12 +284,10 @@ namespace Cielonos.MainGame.Inventory
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
feedbackSc["NormalHit"].Play();
|
||||
player.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
enemy.selfTimeSm.ModifyTimeScale(0.06f);
|
||||
new ElectronicDisturbance(2).Apply(enemy);
|
||||
});
|
||||
|
||||
Swing("Swing", "Swing", swingForce);
|
||||
Swing("NormalSwing", "NormalSwing", swingForce);
|
||||
}
|
||||
|
||||
string parryAnimName = "ParryL";
|
||||
@@ -295,10 +297,20 @@ namespace Cielonos.MainGame.Inventory
|
||||
BlockSource blockSource = blockData.CreateBlockSource(player, this);
|
||||
blockSource.onNormalBlock = (attackArea) =>
|
||||
{
|
||||
PostProcessingManager.Instance.chromaticAberrationSm.ModifyIntensity(0.2f);
|
||||
PostProcessingManager.Instance.radialBlurSm.ModifyBlurRadius(0.2f);
|
||||
parryAnimName = parryAnimName == "ParryL" ? "ParryR" : "ParryL";
|
||||
animationSc.fullBodyFuncAnimSm.Play(parryAnimName, 1, 0);
|
||||
player.selfTimeSm.ModifyTimeScale(0.06f, 0.4f);
|
||||
attackArea.creator.selfTimeSm.ModifyTimeScale(0.06f, 0.4f);
|
||||
|
||||
if (parryAnimName == "ParryL")
|
||||
{
|
||||
feedbackSc["NormalBlockLeft"].Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
feedbackSc["NormalBlockRight"].Play();
|
||||
}
|
||||
|
||||
if (attackArea is NormalArea)
|
||||
{
|
||||
new ElectronicDisturbance(2).Apply(attackArea.creator);
|
||||
@@ -306,15 +318,27 @@ namespace Cielonos.MainGame.Inventory
|
||||
};
|
||||
blockSource.onPerfectBlock = (attackArea) =>
|
||||
{
|
||||
PostProcessingManager.Instance.chromaticAberrationSm.ModifyIntensity(0.5f);
|
||||
PostProcessingManager.Instance.radialBlurSm.ModifyBlurRadius(0.5f);
|
||||
parryAnimName = parryAnimName == "ParryL" ? "ParryR" : "ParryL";
|
||||
animationSc.fullBodyFuncAnimSm.Play(parryAnimName, 1, 0);
|
||||
player.selfTimeSm.ModifyTimeScale(0.12f, EaseType.InQuint, 0.2f);
|
||||
attackArea.creator.selfTimeSm.ModifyTimeScale(0.12f, EaseType.InQuint, 0.2f);
|
||||
|
||||
if (parryAnimName == "ParryL")
|
||||
{
|
||||
feedbackSc["PerfectBlockLeft"].Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
feedbackSc["PerfectBlockRight"].Play();
|
||||
}
|
||||
|
||||
perfectBlockedTimer = 0.5f;
|
||||
if (attackArea is NormalArea)
|
||||
{
|
||||
new ElectronicDisturbance(10).Apply(attackArea.creator);
|
||||
}
|
||||
|
||||
//Debug.Break();
|
||||
};
|
||||
player.reactionSc.blockSm.ApplyBlock(blockSource);
|
||||
//blockDisposable?.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user