winscreen
This commit is contained in:
@@ -1,5 +1 @@
|
||||
<<<<<<< HEAD
|
||||
{"count":1,"self":10.4157048,"total":11.1841809,"children":{"InitializeActuators":{"count":8,"self":0.0019944999999999997,"total":0.0019944999999999997,"children":null},"InitializeSensors":{"count":8,"self":0.0019947,"total":0.0019947,"children":null},"AgentSendState":{"count":314,"self":0.0484605,"total":0.0744336,"children":{"CollectObservations":{"count":504,"self":0.00801,"total":0.00801,"children":null},"WriteActionMask":{"count":504,"self":0.00099549999999999986,"total":0.00099549999999999986,"children":null},"RequestDecision":{"count":504,"self":0.0169676,"total":0.0169676,"children":null}}},"DecideAction":{"count":314,"self":0.63277189999999994,"total":0.6397572,"children":{"RayPerceptionSensor.Perceive":{"count":1008,"self":0.0069853,"total":0.0069853,"children":null}}},"AgentAct":{"count":314,"self":0.0472652,"total":0.0472652,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714121178","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":"1714121189"}}
|
||||
=======
|
||||
{"count":1,"self":10.229835999999999,"total":10.539707,"children":{"InitializeActuators":{"count":8,"self":0.0015033,"total":0.0015033,"children":null},"InitializeSensors":{"count":8,"self":0.0015321,"total":0.0015321,"children":null},"AgentSendState":{"count":302,"self":0.025935299999999998,"total":0.0560955,"children":{"CollectObservations":{"count":488,"self":0.0060285,"total":0.0060285,"children":null},"WriteActionMask":{"count":488,"self":0,"total":0,"children":null},"RequestDecision":{"count":488,"self":0.0241317,"total":0.0241317,"children":null}}},"DecideAction":{"count":302,"self":0.22161319999999998,"total":0.2252556,"children":{"RayPerceptionSensor.Perceive":{"count":976,"self":0.0036423999999999996,"total":0.0036423999999999996,"children":null}}},"AgentAct":{"count":302,"self":0.0239814,"total":0.0239814,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714119859","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":"1714119870"}}
|
||||
>>>>>>> 2296b85dc53301fe32c92b3c43dbf49679df7e9b
|
||||
{"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"}}
|
||||
@@ -1,9 +1 @@
|
||||
<<<<<<< HEAD
|
||||
{"count":1,"self":86.943936,"total":96.840498599999989,"children":{"InitializeActuators":{"count":8,"self":0.0029922,"total":0.0029922,"children":null},"InitializeSensors":{"count":8,"self":0.0029917,"total":0.0029917,"children":null},"AgentSendState":{"count":4582,"self":0.78503249999999991,"total":0.9650871,"children":{"CollectObservations":{"count":6288,"self":0.10648149999999999,"total":0.10648149999999999,"children":null},"WriteActionMask":{"count":6288,"self":0.02222,"total":0.02222,"children":null},"RequestDecision":{"count":6288,"self":0.0513531,"total":0.0513531,"children":null}}},"DecideAction":{"count":4582,"self":8.3173576,"total":8.4548896,"children":{"RayPerceptionSensor.Perceive":{"count":12576,"self":0.1375323,"total":0.1375323,"children":null}}},"AgentAct":{"count":4582,"self":0.46860939999999995,"total":0.46860939999999995,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":24.91114,"min":19.7783585,"runningAverage":21.9734344,"value":21.0881538,"weightedAverage":21.94166}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714121754","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":"WinScreen","end_time_seconds":"1714121851"}}
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
{"count":1,"self":495.4255872,"total":498.2974708,"children":{"InitializeActuators":{"count":8,"self":0,"total":0,"children":null},"InitializeSensors":{"count":8,"self":0.0020004,"total":0.0020004,"children":null},"AgentSendState":{"count":4757,"self":0.289884,"total":0.3578125,"children":{"CollectObservations":{"count":7616,"self":0.035282299999999996,"total":0.035282299999999996,"children":null},"WriteActionMask":{"count":7616,"self":0.0061163,"total":0.0061163,"children":null},"RequestDecision":{"count":7616,"self":0.0265299,"total":0.0265299,"children":null}}},"DecideAction":{"count":4757,"self":2.1771583999999997,"total":2.227519,"children":{"RayPerceptionSensor.Perceive":{"count":15232,"self":0.050360699999999994,"total":0.050360699999999994,"children":null}}},"AgentAct":{"count":4757,"self":0.28455169999999996,"total":0.28455169999999996,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":25.4703846,"min":20.7829914,"runningAverage":23.9274235,"value":21.1050835,"weightedAverage":23.3504276}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714118972","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":"WinScreen","end_time_seconds":"1714119471"}}
|
||||
=======
|
||||
{"count":1,"self":309.1399424,"total":332.36884549999996,"children":{"InitializeActuators":{"count":8,"self":0.0025664999999999998,"total":0.0025664999999999998,"children":null},"InitializeSensors":{"count":8,"self":0.0032746,"total":0.0032746,"children":null},"AgentSendState":{"count":16365,"self":2.330854,"total":2.7563383,"children":{"CollectObservations":{"count":21936,"self":0.2326556,"total":0.2326556,"children":null},"WriteActionMask":{"count":21936,"self":0.0537007,"total":0.0537007,"children":null},"RequestDecision":{"count":21936,"self":0.1391281,"total":0.1391281,"children":null}}},"DecideAction":{"count":16365,"self":18.895307199999998,"total":19.2007151,"children":{"RayPerceptionSensor.Perceive":{"count":43872,"self":0.30540819999999996,"total":0.30540819999999996,"children":null}}},"AgentAct":{"count":16365,"self":1.2650044,"total":1.2650044,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":24.6894,"min":10.6325016,"runningAverage":18.0623131,"value":14.3437386,"weightedAverage":17.18949}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714118988","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\hassa\\OneDrive\\Skrivebord\\alt pro\\Unity stuff\\Unity ting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-hassa -hubSessionId f8278c6f-053c-492d-a479-00a9dbf73437 -accessToken 1rPuSgTkgUUOXMaGthhixd2ZEngLQ-H31CETUrEqtzM005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"WinScreen","end_time_seconds":"1714119320"}}
|
||||
>>>>>>> f4d4e76f8b5ccb20237103e437b5acd47d7b3c40
|
||||
>>>>>>> 2296b85dc53301fe32c92b3c43dbf49679df7e9b
|
||||
{"count":1,"self":151.5671552,"total":159.4234014,"children":{"InitializeActuators":{"count":8,"self":0.0039895,"total":0.0039895,"children":null},"InitializeSensors":{"count":8,"self":0.0029920999999999997,"total":0.0029920999999999997,"children":null},"AgentSendState":{"count":5608,"self":0.6404556,"total":0.7972872,"children":{"CollectObservations":{"count":4928,"self":0.0867767,"total":0.0867767,"children":null},"WriteActionMask":{"count":4928,"self":0.017532199999999998,"total":0.017532199999999998,"children":null},"RequestDecision":{"count":4928,"self":0.0525227,"total":0.0525227,"children":null}}},"DecideAction":{"count":5608,"self":6.5150619999999995,"total":6.624032,"children":{"RayPerceptionSensor.Perceive":{"count":9856,"self":0.10897,"total":0.10897,"children":null}}},"AgentAct":{"count":5608,"self":0.4279439,"total":0.4279439,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":7,"max":25.59539,"min":20.5583878,"runningAverage":23.1924419,"value":23.1277428,"weightedAverage":23.0449276}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714126497","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":"WinScreen","end_time_seconds":"1714126657"}}
|
||||
@@ -226,6 +226,16 @@ MonoBehaviour:
|
||||
- {fileID: 127894455}
|
||||
defaultColors:
|
||||
- {fileID: 2100000, guid: 09dbb87d6674be741b80fa8cefe11b0e, type: 2}
|
||||
--- !u!1 &163619876 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 1496457013}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &182581428 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 1873035929}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &204152976
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -427,6 +437,11 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 363122539}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &446304807 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 363122539}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &484370173
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -835,6 +850,24 @@ MonoBehaviour:
|
||||
- 2442
|
||||
- DNF
|
||||
- DNF
|
||||
Garages:
|
||||
- {fileID: 1759731988}
|
||||
- {fileID: 163619876}
|
||||
- {fileID: 182581428}
|
||||
- {fileID: 1548256152}
|
||||
- {fileID: 446304807}
|
||||
- {fileID: 1977529810}
|
||||
- {fileID: 1257793076}
|
||||
- {fileID: 1433079962}
|
||||
Cars:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
--- !u!1001 &850453472
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1459,6 +1492,16 @@ MonoBehaviour:
|
||||
- {fileID: 1204717678}
|
||||
defaultColors:
|
||||
- {fileID: 2100000, guid: 290dcb9964b00e94bb0debc820182e71, type: 2}
|
||||
--- !u!1 &1257793076 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 874635445}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1433079962 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 1050167112}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1496457013
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1529,6 +1572,11 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4396357477850336864, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 1496457013}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1548256152 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 484370173}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &1556617105
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1758,6 +1806,11 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1688019504}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1759731988 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 2144194469}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1828984436
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2234,6 +2287,11 @@ CanvasRenderer:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1879694846}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &1977529810 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
m_PrefabInstance: {fileID: 2076255753}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &2002437005
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -2487,7 +2545,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5471432146962600635, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 1
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6033441500748191172, guid: 72f36551c0bfff14fa73ab0c8bb3b28f, type: 3}
|
||||
propertyPath: car
|
||||
|
||||
@@ -2,19 +2,67 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
public class WinScript : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI MainText;
|
||||
public TextMeshProUGUI MainText2;
|
||||
public List<string> leaderboard;
|
||||
public List<string> time;
|
||||
public GameObject winner;
|
||||
public GameObject[] Garages;
|
||||
|
||||
private GameObject currentGarage;
|
||||
|
||||
void Start()
|
||||
{
|
||||
foreach (GameObject carGarage in Garages)
|
||||
{
|
||||
carGarage.SetActive(false);
|
||||
}
|
||||
leaderboard = GameObject.Find("GameManager").GetComponent<GameManager>().playersFinished;
|
||||
time = GameObject.Find("GameManager").GetComponent<GameManager>().playerTimes;
|
||||
|
||||
if (leaderboard[0] == "Racecar")
|
||||
{
|
||||
currentGarage = Garages[6];
|
||||
Garages[6].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "Hotrod")
|
||||
{
|
||||
currentGarage = Garages[2];
|
||||
Garages[2].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "Icecream")
|
||||
{
|
||||
currentGarage = Garages[5];
|
||||
Garages[5].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "MuscleCar")
|
||||
{
|
||||
currentGarage = Garages[1];
|
||||
Garages[1].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "Pickup")
|
||||
{
|
||||
currentGarage = Garages[3];
|
||||
Garages[3].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "SchoolBus")
|
||||
{
|
||||
currentGarage = Garages[7];
|
||||
Garages[7].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "Sportscar")
|
||||
{
|
||||
currentGarage = Garages[4];
|
||||
Garages[4].SetActive(true);
|
||||
}
|
||||
else if (leaderboard[0] == "StreetRacist")
|
||||
{
|
||||
currentGarage = Garages[0];
|
||||
Garages[0].SetActive(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -23,13 +71,18 @@ public class WinScript : MonoBehaviour
|
||||
private void Update()
|
||||
{
|
||||
MainText.text = "Leaderboard: ";
|
||||
MainText2.text = "\n";
|
||||
MainText2.text = "Time: ";
|
||||
for (var i = 0; i < leaderboard.Count; i++){
|
||||
MainText.text += "\n" + (i+1) + "." + leaderboard[i];
|
||||
MainText2.text += "\n(" + time[i] + ")";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void FixedUpdate() {
|
||||
currentGarage.transform.eulerAngles += Vector3.up * 0.7f;
|
||||
//currentRotation = CurrentCar.transform.rotation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user