using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Game;
using Music;
using Player;
using UnityEngine.Audio;
namespace Music
{
///
/// Represents a single layer of a music track.
/// Each layer can be triggered and controlled independently based on game events or conditions.
///
[System.Serializable]
public class TrackLayer
{
///
/// The name of the music layer.
///
public string layerName;
///
/// The audio clip associated with this music layer.
///
public AudioClip layerTrack;
///
/// Defines the conditions under which this layer is enabled.
///
public enum EnableTrigger
{
/// Enabled when a specific scene is active.
Scene,
/// Enabled when the player is magnetized.
Magnetism,
/// Enabled when a goal is activated.
Goal,
/// Enabled when a button is pressed.
Button,
/// Enabled when a toggle is active.
Toggle,
/// Enabled when the player is moving.
Movement,
/// Enabled when a constant force is applied to the player.
ConstantForce,
/// Enabled at the end of a level.
EndOfLevel,
/// Enabled during an electromagnetic pulse event.
ElectromagneticPulse,
/// Enabled when a collectible is interacted with.
Collectible
}
///
/// The trigger condition for enabling this layer.
///
public EnableTrigger enableTrigger = EnableTrigger.Scene;
///
/// A list of scenes where this layer is active.
/// If empty, the layer is active in all scenes.
///
public List layerScenes;
///
/// The name of the object that triggers this layer.
///
public string triggerName;
}
}