22 lines
710 B
C#
22 lines
710 B
C#
using System.Collections.Generic;
|
|
using SLSFramework.FeelAssistance;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Characters
|
|
{
|
|
public class FeedbackSubcontroller : SubcontrollerBase<CharacterBase>
|
|
{
|
|
public Dictionary<string, FeedbackUnit> feedbacks;
|
|
public FeedbackUnit this[string feedbackName] => feedbacks.GetValueOrDefault(feedbackName, null);
|
|
|
|
private void Update()
|
|
{
|
|
foreach (var feedbackUnit in feedbacks.Values)
|
|
{
|
|
float timeScaleMultiplier = owner.selfTimeSm.TimeScale;
|
|
feedbackUnit.feedback.ExternalTimeScale = timeScaleMultiplier;
|
|
feedbackUnit.Update();
|
|
}
|
|
}
|
|
}
|
|
} |