17 lines
324 B
C#
17 lines
324 B
C#
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);
|
|
}
|
|
}
|
|
}
|