Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         targetDoor.Open();
         ModeObserver m = this.gameObject.GetComponent <ModeObserver>();
         ModeControl.Instance.modeObservers.Remove(m);
         Destroy(this.gameObject);
     }
 }
Exemple #2
0
 private void Start()
 {
     player       = GameObject.Find("Player").GetComponent <Player>();
     modeObserver = this.gameObject.GetComponent <ModeObserver>();
 }
Exemple #3
0
 public void RegisterObserver(ModeObserver observer)
 {
     modeObservers.Add(observer);
 }