Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (Input.GetMouseButtonDown(0))
- {
- Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
- Vector2 mousePos2D = new Vector2(mousePos.x, mousePos.y);
- RaycastHit2D hit = Physics2D.Raycast(mousePos2D, Vector2.zero);
- if (hit.collider != null)
- {
- if (hit.transform.tag == "Mensch" && hit.transform.gameObject == specificHuman)
- {
- if (hit.transform.gameObject.name.Contains("People"))
- {
- nameText.text = "Tommy";
- menschImage.sprite = menschenSprites[0];
- }
- einreisePanel.SetActive(true);
- human = hit.transform.gameObject;
- raycastAllowed = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement