21 lines
No EOL
513 B
C#
Executable file
21 lines
No EOL
513 B
C#
Executable file
using UnityEngine;
|
|
|
|
public class DATA_DATA_Room : MonoBehaviour
|
|
{
|
|
[Header("Settings")]
|
|
public AudioClip roomMusic;
|
|
public Transform spawnPoint;
|
|
public Collider2D cameraBounds;
|
|
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
if (other.CompareTag("Player"))
|
|
{
|
|
if (roomMusic != null)
|
|
MANAGER_Music.Instance.SwitchMusic(roomMusic);
|
|
|
|
MANAGER_DATA_RoomTransition.Instance.UpdateCameraBounds(cameraBounds);
|
|
|
|
}
|
|
}
|
|
} |