Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public GameObject singleChar;
- public GameObject bothChar;
- public GameObject charOne;
- public GameObject charTwo;
- private void Start()
- {
- singleChar.SetActive(true);
- bothChar.SetActive(false);
- }
- private void OnTriggerEnter(Collider other)
- {
- if (other.CompareTag("Player") || other.CompareTag("PlayerTwo"))
- {
- singleChar.SetActive(true);
- bothChar.SetActive(false);
- }
- }
- private void Update()
- {
- if (charOne.transform.position.x < -430f && charTwo.transform.position.x < -430f)
- {
- singleChar.SetActive(false);
- bothChar.SetActive(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement