UnityGameProjectsCode / AbandondedGame / FootStepChangeTrigger.cs
FootStepChangeTrigger.cs
Raw
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FootStepChangeTrigger : MonoBehaviour
{
    private StepSoundTransition soundTransition;
    public int floorType;

    private void Start()
    {
        soundTransition = ReferenceManager.GetObject(8).GetComponent<StepSoundTransition>();
    }

    private void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.name == "FPSController")
        {
            soundTransition.SetClipList(floorType);
        }
    }
}