mEgre
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user