using System.Collections.Generic; using System.Linq; using UnityEngine; namespace Syntriax.Modules.Movement.VariableMovement { public class VariableMovementBehaviourApplier : MonoBehaviour { private List movements = new List(); private IVariableMovementController variableMovementController = null; private void Start() { movements = GetComponents().ToList(); variableMovementController = GetComponent(); } private void Update() { foreach (var movement in movements) movement.MovementMultiplier = variableMovementController.CurrentVariableMovement.VariableMovementAsset.MovementMultiplier; } } }