public void Close() { GameObject OpenSound = Instantiate(CloseSfxPrefab, transform.position, new Quaternion()); Sfx Sfx = OpenSound.GetComponent <Sfx>(); Sfx.InitializeIndex(PreviousOpenIndex); }
public void Open() { GameObject OpenSound = Instantiate(OpenSfxPrefab, transform.position, new Quaternion()); Sfx Sfx = OpenSound.GetComponent <Sfx>(); Sfx.InitializeIndex(-1); }