Exemple #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         _questionUtilities.SetEnemyType("chest");
         _questionUtilities.SetChest(this, gameObject);
         _questionUtilities.StartBattle();
     }
 }
Exemple #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         Debug.Log("collide");
         _questionUtilities.SetEnemyType(gameObject.name == "Boss" ? "boss" : "mob");
         _questionUtilities.SetEnemy(this, gameObject);
         _questionUtilities.StartBattle();
         // GameObject.FindWithTag("GameManager").GetComponent<InputQuestionUtilities>().DisplayInputQuestionMenu();
         // GameObject.FindWithTag("GameManager").GetComponent<InputQuestionUtilities>().PrepareInputQuestion();
         // Destroy(other.gameObject);
     }
 }
Exemple #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (!GameObject.Find("GameManager").GetComponent <DropSystem>().keyFound)
     {
         GameObject.Find("GameManager").GetComponent <InfoMessage>().DisplayDoorMessage();
     }
     else
     {
         audioSrc.Play();
         _questionUtilities.SetEnemyType("door");
         _questionUtilities.SetNextScene(nextScene);
         _questionUtilities.StartBattle();
     }
 }