Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class LaneCollider : MonoBehaviour {
  6.  
  7. public GameObject lane;
  8. public bool positive;
  9.  
  10. // Use this for initialization
  11. void Start () {
  12.  
  13. }
  14.  
  15. // Update is called once per frame
  16. void Update () {
  17.  
  18. }
  19.  
  20. private void OnTriggerEnter(Collider other)
  21. {
  22. lane.GetComponent<LaneController>().enterEndZone(other.gameObject, positive);
  23. }
  24.  
  25. private void OnTriggerExit(Collider other)
  26. {
  27. lane.GetComponent<LaneController>().exitEndZone(other.gameObject, positive);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement