Driving UI 2
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 58f7e79a87c79824597746e8c1bfe400
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: f58d25b9e504a4f41ab4a71cf87c1845
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
@@ -1,5 +1 @@
|
|||||||
<<<<<<< HEAD
|
{"count":1,"self":14.5199792,"total":14.604305799999999,"children":{"InitializeActuators":{"count":8,"self":0.0010126,"total":0.0010126,"children":null},"InitializeSensors":{"count":8,"self":0.001,"total":0.001,"children":null},"AgentSendState":{"count":6,"self":0.0035098,"total":0.0170553,"children":{"CollectObservations":{"count":16,"self":0.0020025999999999998,"total":0.0020025999999999998,"children":null},"WriteActionMask":{"count":16,"self":0,"total":0,"children":null},"RequestDecision":{"count":16,"self":0.0115429,"total":0.0115429,"children":null}}},"DecideAction":{"count":6,"self":0.0632583,"total":0.0632583,"children":{"RayPerceptionSensor.Perceive":{"count":32,"self":0,"total":0,"children":null}}},"AgentAct":{"count":6,"self":0.0010003,"total":0.0010003,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714129274","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\noahk\\Documents\\Unity projects\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-noahk -hubSessionId a6f45e0e-41b6-4c96-a70e-ec8e10ca5aa9 -accessToken LhF-MiZYoHmiI2p1_6JvQZvJ6QUPd4VyLbrTbhNHTT8005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"ForestRacetrack","end_time_seconds":"1714129288"}}
|
||||||
{"count":1,"self":121.0610688,"total":138.0208419,"children":{"InitializeActuators":{"count":8,"self":0.0019971,"total":0.0019971,"children":null},"InitializeSensors":{"count":8,"self":0.0040322,"total":0.0040322,"children":null},"AgentSendState":{"count":6652,"self":1.3374462999999999,"total":1.5864675,"children":{"CollectObservations":{"count":10648,"self":0.13765929999999998,"total":0.13765929999999998,"children":null},"WriteActionMask":{"count":10648,"self":0.0276351,"total":0.0276351,"children":null},"RequestDecision":{"count":10648,"self":0.08372679999999999,"total":0.08372679999999999,"children":null}}},"DecideAction":{"count":6652,"self":14.4748288,"total":14.7074404,"children":{"RayPerceptionSensor.Perceive":{"count":21296,"self":0.2326122,"total":0.2326122,"children":null}}},"AgentAct":{"count":6652,"self":0.65683969999999992,"total":0.65683969999999992,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":24.5822716,"min":17.1586933,"runningAverage":21.37373,"value":17.1586933,"weightedAverage":21.06385}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714127057","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\Magnus\\Desktop\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 8c17471b-7795-4082-905c-75744d6a077b -accessToken hv3zp4IA8nxcowfZc35r5tDHrlmzUZoExTBgESksngo005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"ForestRacetrack","end_time_seconds":"1714127195"}}
|
|
||||||
=======
|
|
||||||
{"count":1,"self":16.4673248,"total":16.889606399999998,"children":{"InitializeActuators":{"count":8,"self":0.0030069999999999997,"total":0.0030069999999999997,"children":null},"InitializeSensors":{"count":8,"self":0.0010002,"total":0.0010002,"children":null},"AgentSendState":{"count":617,"self":0.038239999999999996,"total":0.056531899999999996,"children":{"CollectObservations":{"count":992,"self":0.0066193,"total":0.0066193,"children":null},"WriteActionMask":{"count":992,"self":0,"total":0,"children":null},"RequestDecision":{"count":992,"self":0.0116726,"total":0.0116726,"children":null}}},"DecideAction":{"count":617,"self":0.31339469999999997,"total":0.3166316,"children":{"RayPerceptionSensor.Perceive":{"count":1984,"self":0.0032369,"total":0.0032369,"children":null}}},"AgentAct":{"count":617,"self":0.044110199999999995,"total":0.044110199999999995,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714124585","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\noahk\\Documents\\Unity projects\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-noahk -hubSessionId a6f45e0e-41b6-4c96-a70e-ec8e10ca5aa9 -accessToken LhF-MiZYoHmiI2p1_6JvQZvJ6QUPd4VyLbrTbhNHTT8005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"ForestRacetrack","end_time_seconds":"1714124602"}}
|
|
||||||
>>>>>>> 49b4414155257b40f20687a86068adc472c780dd
|
|
||||||
@@ -4694,7 +4694,6 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 78b183b93b28716489abc7e12d0ee15f, type: 3}
|
m_Script: {fileID: 11500000, guid: 78b183b93b28716489abc7e12d0ee15f, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
time: 0
|
|
||||||
--- !u!65 &1513738219
|
--- !u!65 &1513738219
|
||||||
BoxCollider:
|
BoxCollider:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -6174,6 +6173,14 @@ PrefabInstance:
|
|||||||
propertyPath: lapAmount
|
propertyPath: lapAmount
|
||||||
value: 3
|
value: 3
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5365138393421743302, guid: dc3e6243ce610df4c845a9fa5df754a7, type: 3}
|
||||||
|
propertyPath: lapCounter
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1885205886}
|
||||||
|
- target: {fileID: 5365138393421743302, guid: dc3e6243ce610df4c845a9fa5df754a7, type: 3}
|
||||||
|
propertyPath: timeCounter
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 1986611068}
|
||||||
- target: {fileID: 5365138393421743302, guid: dc3e6243ce610df4c845a9fa5df754a7, type: 3}
|
- target: {fileID: 5365138393421743302, guid: dc3e6243ce610df4c845a9fa5df754a7, type: 3}
|
||||||
propertyPath: players.Array.size
|
propertyPath: players.Array.size
|
||||||
value: 8
|
value: 8
|
||||||
|
|||||||
@@ -28,10 +28,9 @@ public class GameManager : MonoBehaviour
|
|||||||
playerLaps[i] = 1;
|
playerLaps[i] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < playerTimes.Count(); i++)
|
for (int i = 0; i < players.Count(); i++)
|
||||||
{
|
{
|
||||||
playerTimes[i] = 0;
|
playerTimes[i] = 0;
|
||||||
playerTimesStr[i] = "DNF";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
@@ -83,7 +82,7 @@ public class GameManager : MonoBehaviour
|
|||||||
lapCounter.text = "Lap count: " + playerLaps[i];
|
lapCounter.text = "Lap count: " + playerLaps[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
timeCounter.text = playerTimes[i].ToString();
|
timeCounter.text = "Time: " + playerTimes[i].ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerLaps[i] > lapAmount)
|
if (playerLaps[i] > lapAmount)
|
||||||
@@ -98,7 +97,6 @@ public class GameManager : MonoBehaviour
|
|||||||
player.GetComponent<PlayerController>().enabled = false;
|
player.GetComponent<PlayerController>().enabled = false;
|
||||||
|
|
||||||
playerTimesStr[i] = playerTimes[i].ToString();
|
playerTimesStr[i] = playerTimes[i].ToString();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +104,7 @@ public class GameManager : MonoBehaviour
|
|||||||
// race finished
|
// race finished
|
||||||
if (playersFinished.Count() == players.Count())
|
if (playersFinished.Count() == players.Count())
|
||||||
{
|
{
|
||||||
|
// if not finished DNF //TODO
|
||||||
SceneManager.LoadScene("WinScreen");
|
SceneManager.LoadScene("WinScreen");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class WinScript : MonoBehaviour
|
|||||||
public TextMeshProUGUI MainText;
|
public TextMeshProUGUI MainText;
|
||||||
public TextMeshProUGUI MainText2;
|
public TextMeshProUGUI MainText2;
|
||||||
public List<string> leaderboard;
|
public List<string> leaderboard;
|
||||||
public List<string> time;
|
public string[] time;
|
||||||
public GameObject[] Garages;
|
public GameObject[] Garages;
|
||||||
|
|
||||||
private GameObject currentGarage;
|
private GameObject currentGarage;
|
||||||
@@ -20,7 +20,7 @@ public class WinScript : MonoBehaviour
|
|||||||
carGarage.SetActive(false);
|
carGarage.SetActive(false);
|
||||||
}
|
}
|
||||||
leaderboard = GameObject.Find("GameManager").GetComponent<GameManager>().playersFinished;
|
leaderboard = GameObject.Find("GameManager").GetComponent<GameManager>().playersFinished;
|
||||||
time = GameObject.Find("GameManager").GetComponent<GameManager>().playerTimesSTR;
|
time = GameObject.Find("GameManager").GetComponent<GameManager>().playerTimesStr;
|
||||||
if (leaderboard[0].Contains("Player")){
|
if (leaderboard[0].Contains("Player")){
|
||||||
Garages[0].SetActive(true);
|
Garages[0].SetActive(true);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user