This commit is contained in:
2024-04-23 10:45:45 +02:00
parent 89993829ba
commit f2ae69b28f
16 changed files with 809 additions and 912 deletions

View File

@@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CarLoader : MonoBehaviour
{
public GameObject Hotrod;
GameObject playerCar;
void Start()
{
playerCar = GameObject.Find("Car Data").GetComponent<CarData>().playerCar;
replaceCar(Hotrod);
}
void replaceCar(GameObject car)
{
Transform carTransform = car.transform;
playerCar.transform.position = carTransform.position;
playerCar.transform.rotation = carTransform.rotation;
playerCar.transform.localScale = carTransform.localScale;
}
}