using System.Collections.Generic; using UnityEngine; namespace Syntriax.Modules.Movement.VariableMovement.SimpleImplementation { public class SimpleVariableMovementController : MonoBehaviour, IVariableMovementController { private static IVariableMovement DefaultVariableMovement = new SimpleVariableMovement(new DefaulVariableMovementAsset()); public bool StateEnabled { get; set; } = false; public List VariableMovements { get; protected set; } = new List(); public IVariableMovement CurrentVariableMovement { get { if (!StateEnabled) return DefaultVariableMovement; foreach (IVariableMovement variableMovement in VariableMovements) if (variableMovement.StateEnabled) return variableMovement; return DefaultVariableMovement; } } } }