后处理+FEEL完全改进
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Cielonos.MainGame.Characters;
|
||||
using MoreMountains.Feedbacks;
|
||||
using MoreMountains.FeedbacksForThirdParty;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -98,18 +99,36 @@ namespace Cielonos.MainGame.Inventory
|
||||
|
||||
public partial class MainWeaponBase
|
||||
{
|
||||
protected void Swing(string swingAudio = "", string feedBackName = "", Vector3 force = default)
|
||||
protected void Swing(string swingAudio, string feedBackName)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(swingAudio))
|
||||
{
|
||||
audioContainer.PlaySoundFX(swingAudio, null, true);
|
||||
}
|
||||
|
||||
if (force != default)
|
||||
feedbackSc[feedBackName].Play();
|
||||
}
|
||||
|
||||
protected void Swing(string swingAudio, string feedBackName, Vector3 swingRotation, Vector3 swingVelocity = default)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(swingAudio))
|
||||
{
|
||||
feedbackSc[feedBackName].feedback.GetFeedbackOfType<MMF_CinemachineImpulse>().Velocity = force;
|
||||
feedbackSc[feedBackName].Play();
|
||||
audioContainer.PlaySoundFX(swingAudio, null, true);
|
||||
}
|
||||
|
||||
MMF_CinemachineRotation cinemachineRotation = feedbackSc[feedBackName].feedback.GetFeedbackOfType<MMF_CinemachineRotation>();
|
||||
if (cinemachineRotation != null)
|
||||
{
|
||||
cinemachineRotation.RotationAmplitude = swingRotation != default ? swingRotation : Vector3.zero;
|
||||
}
|
||||
|
||||
MMF_CinemachineImpulse cinemachineImpulse = feedbackSc[feedBackName].feedback.GetFeedbackOfType<MMF_CinemachineImpulse>();
|
||||
if (cinemachineImpulse != null)
|
||||
{
|
||||
cinemachineImpulse.Velocity = swingVelocity != default ? swingVelocity : Vector3.zero;
|
||||
}
|
||||
|
||||
feedbackSc[feedBackName].Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user