private void Awake() { fakeBLE = fakeBLE.GetComponent <FakeBLE>(); tsc01 = new TopSpeedChallenge(TopSpeedImage, 30); msc01 = new MaintainSpeedChallenge(MaintainSpeedImage, 30, 20); tdc01 = new TotalDistanceChallenge(TotalDistanceImage, 30); //Not sure of value }
private void Awake() { // Need to find out how to change certain statuses //ChallengeData data = SaveSystem.LoadChallengeData(); //challengeStatuses = new bool[numChallenges]; // Initialize the challenges with certain stats tsc01 = new TopSpeedChallenge(TopSpeedImage, 20); msc01 = new MaintainSpeedChallenge(MaintainSpeedImage, 10, 30); rpc01 = new RacePlacementChallenge(RacePlacementImage, 3); tdc01 = new TotalDistanceChallenge(TotalDistanceImage, 1); //Not sure of value //RealTimeClient.Instance.RaceEnd += RaceEndTrigger; }
IEnumerator TotalDistanceTrigger(TotalDistanceChallenge challenge) { Debug.Log("TOTALDISTANCEACHIEVED"); challenge.Achieved = true; challenge.Image.SetActive(true); challengeTitle.GetComponent <Text>().text = challenge.Title; challengeDescription.GetComponent <Text>().text = challenge.Description; challengePanel.SetActive(true); yield return(new WaitForSeconds(7)); challengePanel.SetActive(false); challenge.Image.SetActive(false); }