game(scripts): refmt
This commit is contained in:
parent
72596f0b07
commit
c7242dbe58
|
@ -462,21 +462,21 @@ public void ClearInteractionPrompt()
|
||||||
public void ProperlyEndRun()
|
public void ProperlyEndRun()
|
||||||
{
|
{
|
||||||
SetDisplayState(DisplayState.OverlayCompleteUnderTimeMenu);
|
SetDisplayState(DisplayState.OverlayCompleteUnderTimeMenu);
|
||||||
|
|
||||||
var ui = guiCompletedMenuObject.GetComponent<UIDocument>()?.rootVisualElement;
|
var ui = guiCompletedMenuObject.GetComponent<UIDocument>()?.rootVisualElement;
|
||||||
var timeLabel = ui.Q<Label>("FinalTimeLabel");
|
var timeLabel = ui.Q<Label>("FinalTimeLabel");
|
||||||
var timeScore = ui.Q<Label>("FinalScoreLabel");
|
var timeScore = ui.Q<Label>("FinalScoreLabel");
|
||||||
var timeGrade = ui.Q<Label>("FinalGradeLabel");
|
var timeGrade = ui.Q<Label>("FinalGradeLabel");
|
||||||
|
|
||||||
// calculate a score between 0-1000 and grade (S, A, B, C, D)
|
// calculate a score between 0-1000 and grade (S, A, B, C, D)
|
||||||
// if you finish the run in 2.5 minutes, you get a 1000
|
// if you finish the run in 2.5 minutes, you get a 1000
|
||||||
// from 2.5 to 5 minutes, the score goes down to 0
|
// from 2.5 to 5 minutes, the score goes down to 0
|
||||||
|
|
||||||
// scoring parameters
|
// scoring parameters
|
||||||
const float maxScore = 1000f;
|
const float maxScore = 1000f;
|
||||||
const float maxTimeForMaxScore = 15f; // 2.5 minutes
|
const float maxTimeForMaxScore = 15f; // 2.5 minutes
|
||||||
const float maxTimeForMinScore = 180f; // 5 minutes
|
const float maxTimeForMinScore = 180f; // 5 minutes
|
||||||
|
|
||||||
var score = _elapsedRunTime switch
|
var score = _elapsedRunTime switch
|
||||||
{
|
{
|
||||||
<= maxTimeForMaxScore => maxScore,
|
<= maxTimeForMaxScore => maxScore,
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class LiftController : MonoBehaviour
|
||||||
/// the target position of the lift
|
/// the target position of the lift
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private Vector3 _target;
|
private Vector3 _target;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// initialisation function
|
/// initialisation function
|
||||||
|
|
Reference in a new issue