// Use this for initialization void Start() { _BBE = FindObjectOfType <BigBirdEmitter>().GetComponent <BigBirdEmitter>(); _player = FindObjectOfType <PlayerController>().GetComponent <Transform>(); _box = gameObject.GetComponent <BoxCollider>(); _ME = FindObjectOfType <MusicEmitter>().GetComponent <MusicEmitter>(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }