Added Movements List to the IMovementController + Code Improvement
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Syntriax.Modules.Movement.VariableMovement
|
||||
}
|
||||
}
|
||||
|
||||
protected bool isSet = false;
|
||||
protected IMovementController movementController = null;
|
||||
protected IVariableMovement defaultVariableMovement = null;
|
||||
protected List<IVariableMovementWithState> variableMovementsWithState = null;
|
||||
@@ -43,7 +44,13 @@ namespace Syntriax.Modules.Movement.VariableMovement
|
||||
}
|
||||
|
||||
protected void SetMultiplierToActiveMovement(IMovement currentMovement)
|
||||
=> currentMovement.MovementMultiplier = ActiveVariableMovement.Asset.Multiplier;
|
||||
{
|
||||
if (!isSet)
|
||||
return;
|
||||
|
||||
currentMovement.MovementMultiplier = ActiveVariableMovement.Asset.Multiplier;
|
||||
|
||||
}
|
||||
|
||||
public void LoadVariableMovementCollection(VMCollection collection)
|
||||
{
|
||||
@@ -51,6 +58,7 @@ namespace Syntriax.Modules.Movement.VariableMovement
|
||||
throw new System.NullReferenceException("InputActionCollection must be set on the VariableMovementController to load a collection!");
|
||||
|
||||
this.collection = collection;
|
||||
isSet = true;
|
||||
|
||||
UnsubscribeFromMovements();
|
||||
|
||||
|
Reference in New Issue
Block a user