public Speaker() { this.Tweeter = new Tweeter(); this.Woofer = new Woofer(); Tweeter.tweeterEvent += new SpeakToMeHandler(this.OnSpeakToMeHander); Woofer.wooferEvent += new SpeakToMeHandler(this.OnSpeakToMeHander); }
private void Awake() { if (Woofer.i != null) { Destroy(this); } else { i = this; // DontDestroyOnLoad(gameObject); } }