Exemplo n.º 1
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     if (coll.gameObject.tag == "Player" && door != null && door.IsLocked())
     {
         question.SetVisible(true);
     }
 }
Exemplo n.º 2
0
 void OnCollisionEnter2D(Collision2D coll)
 {
     // Koga ke se sudri so Player pojavi go prasanjeto
     if (coll.gameObject.tag == "Player" && door != null && door.IsLocked())
     {
         question.SetVisible(true);
     }
 }
Exemplo n.º 3
0
 void Start()
 {
     question = GetComponentInChildren <QuestionDialogBase> ();
     question.QuestionAnswered += QuestionAnswered;
     if (doorObject != null)
     {
         door = doorObject.GetComponent <Door> ();
     }
     question.SetVisible(false);
 }
Exemplo n.º 4
0
 void Start()
 {
     // Zemame dialog objektot
     question = GetComponentInChildren <QuestionDialogBase> ();
     // Dodavame lisener na dialogot. (Metoda koja ke se povikuva koga ke se odgovori prasanje
     question.QuestionAnswered += QuestionAnswered;
     // Ako sme dodelile objekt vrata zemi ja skriptata Door od nego
     if (doorObject != null)
     {
         door = doorObject.GetComponent <Door> ();
     }
     // Prasanjeto ne treba da se gleda na pocetok.
     question.SetVisible(false);
 }