123456789101112131415161718192021222324252627 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace TrafficSimulation{
- public class PresetTrigger : MonoBehaviour
- {
- public bool isTriggered;
- // Start is called before the first frame update
- void Start()
- {
- this.isTriggered = false;
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- private void OnTriggerEnter(Collider other) {
- if(other.gameObject.tag == "bike"){
- this.isTriggered = true;
- }
- }
- }
- }
|