1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using Study;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class PlayerStats : MonoBehaviour
- {
- public int collisionCounter;
- public int coinCounter;
- public string condition;
- public int hasFinished;
- public int hasFinishedSlalom1;
- public int hasFinishedSlalom2;
- // Start is called before the first frame update
- void Start()
- {
- collisionCounter = 0;
- coinCounter = 0;
- hasFinished = -1;
- hasFinishedSlalom1 = -1;
- hasFinishedSlalom2 = -1;
- }
- // Update is called once per frame
- void Update()
- {
- }
- public void SetCondition(Study.SteeringMode selection)
- {
- switch (selection)
- {
- case Study.SteeringMode.frontWheel:
- condition = "frontWheel";
- break;
- case Study.SteeringMode.Leaning:
- condition = "Leaning";
- break;
- case Study.SteeringMode.HMD:
- condition = "HMD";
- break;
- }
- }
- public void SetWaypointPassed(WaypointType type)
- {
- switch (type)
- {
- case WaypointType.slalom1:
- hasFinishedSlalom1 = 1;
- break;
- case WaypointType.slalom2:
- hasFinishedSlalom2 = 1;
- break;
- case WaypointType.finish:
- hasFinished = 1;
- break;
- }
- }
- public void IncreaseCollisionCounter()
- {
- collisionCounter += 1;
- }
- public void IncreaseCoinCounter()
- {
- coinCounter += 1;
- }
- }
|