Added Start Menu, -Added CartSpawner, -Added Get Car Key Objective
This commit is contained in:
parent
f737955a88
commit
e7f50f7108
100 changed files with 5304 additions and 16 deletions
16
Assets/Scripts/KeyPickup.cs
Normal file
16
Assets/Scripts/KeyPickup.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using UnityEngine;
|
||||
|
||||
public class KeyPickup : MonoBehaviour
|
||||
{
|
||||
public static bool hasKeys = false;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
hasKeys = true;
|
||||
Debug.Log("Picked up the keys!");
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue