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

@@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class Garage : MonoBehaviour
@@ -13,6 +14,7 @@ public class Garage : MonoBehaviour
public Button[] ColorButtons;
public Material[] Colors;
quaternion currentRotation;
public Button startButton;
void Start()
{
CarButtons[0].onClick.AddListener(SelectHotrod);
@@ -37,6 +39,8 @@ public class Garage : MonoBehaviour
ColorButtons[10].onClick.AddListener(SelectWhite);
ColorButtons[11].onClick.AddListener(SelectYellow);
startButton.onClick.AddListener(startGame);
disable();
SelectHotrod();
}
@@ -62,6 +66,11 @@ public class Garage : MonoBehaviour
CurrentCar.transform.rotation = currentRotation;
}
void startGame()
{
SceneManager.LoadScene("Racetrack mini");
}
void SelectHotrod()
{
SelectCar(0);