void OnTriggerStay2D(Collider2D other) { if (Input.GetKeyDown(KeyCode.Z)) { Debug.Log("z"); lastContactNpc = other; lastContactNpcName = other.name; conversationOn = true; Debug.Log(lastContactNpc); Debug.Log(conversationOn); startConverstation = informationGiver.GetComponent <Town1NpcConversationer>(); startConverstation.Start(); } }
void OnTriggerStay2D(Collider2D other) { if(Input.GetKeyDown(KeyCode.Z)) { Debug.Log ("z"); lastContactNpc = other; lastContactNpcName = other.name; conversationOn = true; Debug.Log (lastContactNpc); Debug.Log (conversationOn); startConverstation = informationGiver.GetComponent<Town1NpcConversationer>(); startConverstation.Start(); } }