Merge branch 'master' of ooftooft.net:Racesm
This commit is contained in:
@@ -1 +1 @@
|
||||
{"count":1,"self":199.1533184,"total":218.8379795,"children":{"InitializeActuators":{"count":8,"self":0.0019921,"total":0.0019921,"children":null},"InitializeSensors":{"count":8,"self":0.0030242999999999997,"total":0.0030242999999999997,"children":null},"AgentSendState":{"count":10664,"self":1.5327274,"total":1.9015727,"children":{"CollectObservations":{"count":12680,"self":0.2323625,"total":0.2323625,"children":null},"WriteActionMask":{"count":12680,"self":0.046358899999999995,"total":0.046358899999999995,"children":null},"RequestDecision":{"count":12680,"self":0.090123899999999993,"total":0.090123899999999993,"children":null}}},"DecideAction":{"count":10664,"self":16.3909248,"total":16.650102999999998,"children":{"RayPerceptionSensor.Perceive":{"count":25360,"self":0.2591788,"total":0.2591788,"children":null}}},"AgentAct":{"count":10664,"self":1.1259698,"total":1.1259698,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":21,"max":25.5732841,"min":19.9673977,"runningAverage":24.3276081,"value":25.3809662,"weightedAverage":25.0823269}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714127324","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":"1714127543"}}
|
||||
{"count":1,"self":170.6430464,"total":189.0146734,"children":{"InitializeActuators":{"count":8,"self":0.0019992,"total":0.0019992,"children":null},"InitializeSensors":{"count":8,"self":0.0019935,"total":0.0019935,"children":null},"AgentSendState":{"count":9173,"self":1.4745792,"total":1.8214966,"children":{"CollectObservations":{"count":11896,"self":0.2234861,"total":0.2234861,"children":null},"WriteActionMask":{"count":11896,"self":0.0479707,"total":0.0479707,"children":null},"RequestDecision":{"count":11896,"self":0.0754606,"total":0.0754606,"children":null}}},"DecideAction":{"count":9173,"self":15.2346224,"total":15.4989647,"children":{"RayPerceptionSensor.Perceive":{"count":23792,"self":0.26434189999999996,"total":0.26434189999999996,"children":null}}},"AgentAct":{"count":9173,"self":1.0441208,"total":1.0441208,"children":null}},"gauges":{"Benson Track2.CumulativeReward":{"count":21,"max":25.6625557,"min":21.0153389,"runningAverage":24.2349434,"value":25.34607,"weightedAverage":25.0115242}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1714128643","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":"1714128832"}}
|
||||
@@ -20,65 +20,61 @@ public class WinScript : MonoBehaviour
|
||||
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);
|
||||
time = GameObject.Find("GameManager").GetComponent<GameManager>().playerTimesSTR;
|
||||
if (leaderboard[0].Contains("Player")){
|
||||
Garages[0].SetActive(true);
|
||||
}else{
|
||||
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);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
MainText.text = "Leaderboard: ";
|
||||
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