24 lines
756 B
C#
24 lines
756 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MoreMountains.Feedbacks;
|
|
using SLSUtilities.FeelAssistance;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Inventory
|
|
{
|
|
public class FeedbackSubcontroller : SubcontrollerBase<ItemBase>
|
|
{
|
|
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.player.selfTimeSm.TimeScale;
|
|
feedbackUnit.feedback.ExternalTimeScale = timeScaleMultiplier;
|
|
feedbackUnit.Update();
|
|
}
|
|
}
|
|
}
|
|
} |