Initial
This commit is contained in:
commit
36a53f343e
1 changed files with 300431 additions and 0 deletions
17
UnityProject/Assets/Scripts/misc/destroyCar.cs.meta
Normal file
17
UnityProject/Assets/Scripts/misc/destroyCar.cs.meta
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue