UnityTrafficSimulation/UnityProject/Assets/Scripts/misc/destroyCar.cs.meta
2026-09-13 20:53:11 +01:00

17 lines
324 B
Text

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class destroyCar : NetworkBehaviour {
public carCount text;
void OnTriggerEnter (Collider other)
{
if(isServer) {
text.IncrementValue();
Destroy(other.gameObject);
}
}
}