Background music
This commit is contained in:
@@ -7,25 +7,22 @@ public class CarCustomizationCamera : MonoBehaviour
|
||||
new Transform transform;
|
||||
public Transform car;
|
||||
public float rotateSpeed;
|
||||
Vector3 startPosition;
|
||||
Quaternion startRotation;
|
||||
public Vector3 startPosition;
|
||||
public Quaternion startRotation;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
transform = GetComponent<Transform>();
|
||||
startPosition = transform.position;
|
||||
startRotation = transform.rotation;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
transform.LookAt(car);
|
||||
// transform.Translate(Vector3.right * Time.deltaTime);
|
||||
transform.position += transform.right * Time.deltaTime * rotateSpeed;
|
||||
}
|
||||
|
||||
private void OnEnable() {
|
||||
transform = GetComponent<Transform>();
|
||||
transform.position = startPosition;
|
||||
transform.rotation = startRotation;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,9 @@ public class Garage : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
AudioSource audioSource = GetComponent<AudioSource>();
|
||||
audioSource.Play();
|
||||
|
||||
HotrodButton.onClick.AddListener(SelectHotrod);
|
||||
RacecarButton.onClick.AddListener(SelectRacecar);
|
||||
FordButton.onClick.AddListener(SelectFord);
|
||||
|
||||
8
Assets/Scripts/Unused.meta
Normal file
8
Assets/Scripts/Unused.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 550214f2aa4827a4285efb764535848a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user