public void StopShake(ShakeID id) { for (int i = 0; i < _ActiveShakes.Count; i++) { var shake = _ActiveShakes [i]; if (shake.ID == id.ID) { _ActiveShakes.RemoveAt(i); break; } } }
public void UpdateShake(ShakeID id, float strength, Vector2 dir) { for (int i = 0; i < _ActiveShakes.Count; i++) { var shake = _ActiveShakes [i]; if (shake.ID == id.ID) { shake.Strength = strength; shake.Direction = dir; _ActiveShakes [i] = shake; } } }