private void PlayLayer(MovementType movementType, SurfaceLayerType surfaceLayerType, Transform layerPosition = null) { foreach (LayerImport import in layerImports) { if (surfaceLayerType != SurfaceLayerType.None && import.key == surfaceLayerType.ToString() + "_" + movementType.ToString()) { if (import.audioObject != null) { import.audioObject.TriggerDirectly(TriggeringAction.StartSound, layerPosition); } } } }
public void ChangeSurfaceLayerType(SurfaceLayerType newSurfaceLayerType) { surfaceLayerType = newSurfaceLayerType; }