void OnTriggerEnter2D(Collider2D other) { if (other.tag == "Player") { _questionUtilities.SetEnemyType("chest"); _questionUtilities.SetChest(this, gameObject); _questionUtilities.StartBattle(); } }
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); } }
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(); } }