Win screen (needs name change)
This commit is contained in:
17
Assets/Scripts/BackToStart.cs
Normal file
17
Assets/Scripts/BackToStart.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class BackToStart : MonoBehaviour
|
||||
{
|
||||
public void returnToStart()
|
||||
{
|
||||
Destroy(GameObject.Find("Car Data"));
|
||||
Destroy(GameObject.Find("SkyboxManager"));
|
||||
Destroy(GameObject.Find("GameManager"));
|
||||
SceneManager.LoadScene(0);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/BackToStart.cs.meta
Normal file
11
Assets/Scripts/BackToStart.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e3f507f50d340f468852b068fedb6fb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -71,7 +71,7 @@ public class Garage : MonoBehaviour
|
||||
|
||||
void startGame()
|
||||
{
|
||||
SceneManager.LoadScene("Map selector");
|
||||
SceneManager.LoadScene(1);
|
||||
carData.GetComponent<CarData>().carType = CurrentCar.name;
|
||||
carData.GetComponent<CarData>().carColor = currentColor;
|
||||
}
|
||||
|
||||
12
Assets/Scripts/TestScripts.cs
Normal file
12
Assets/Scripts/TestScripts.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class TestScripts : MonoBehaviour
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
SceneManager.LoadScene(4);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/TestScripts.cs.meta
Normal file
11
Assets/Scripts/TestScripts.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6353d73605631bb4ba84158bbcdec189
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -7,11 +7,11 @@ public class MapSelectorScript : MonoBehaviour
|
||||
{
|
||||
public int scene;
|
||||
public void change_to_track2(){
|
||||
scene = 1;
|
||||
scene = 2;
|
||||
}
|
||||
|
||||
public void change_to_track3(){
|
||||
scene = 2;
|
||||
scene = 3;
|
||||
}
|
||||
|
||||
public void selectMap(){
|
||||
|
||||
@@ -6,7 +6,7 @@ using TMPro;
|
||||
|
||||
public class TimeOfDay : MonoBehaviour
|
||||
{
|
||||
public string skyboxMaterial;
|
||||
public string skyboxMaterial = "not selected";
|
||||
|
||||
public static TimeOfDay Instance;
|
||||
public TextMeshProUGUI MainText;
|
||||
|
||||
Reference in New Issue
Block a user