Esempio n. 1
0
    void OnCollisionEnter(Collision other)
    {
        GameObject gb = other.gameObject;

        //Debug.Log("Colidiu");
        if (gb.CompareTag("Falha"))
        {
            gm.ShowFalha(gb.GetComponent <Falha>());
        }
        if (gb.CompareTag("questEnd"))
        {
            QuestCatch end = other.gameObject.GetComponent <QuestCatch> ();
            concluirMissao(end);
        }
    }
Esempio n. 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.CompareTag("sceneChanger"))
     {
         int scene = other.gameObject.GetComponent <sceneChanger> ().destinyScene;
         gm.changeScene(scene);
     }
     else if (other.gameObject.CompareTag("questEntry"))
     {
         Quest quest = other.GetComponent <Quest> ();
         //O objeto que colidiu é um objeto de inicio de missão
         if (quest)
         {
             qm.exibirQuest(quest);
         }
     }
     else if (other.gameObject.CompareTag("questEnd"))
     {
         //O objeto que colidiu é um objeto de fim de missão
         QuestCatch end = other.GetComponent <QuestCatch> ();
         concluirMissao(end);
     }
 }
Esempio n. 3
0
 void concluirMissao(QuestCatch fimQuest)
 {
     Debug.Log("Concluiu missao " + fimQuest.questID);
     qm.concluirQuest(fimQuest.questID);
 }