public void Pause() { sharedData.SetPlayerControl(false); sharedData.SetCursorVisible(true); pul.stopTimer(); pauseMenuCanvas.enabled = true; }
public void EndTraining() { sharedData.trainingRouteRecordingStopped = true; //Beendet hinzufügen neuer Framestrokes in AlternateCarController //Entferne PlayerControl und Ball sharedData.SetPlayerControl(false); GameObject.FindGameObjectWithTag("Ball").SetActive(false); if (String.IsNullOrEmpty(sharedData.playerName)) { Debug.LogError("Fehler bei Namenserfassung. Öffne Texteingabe."); GameObject.Find("NameQuestionCanvas").GetComponent <Canvas>().enabled = true; } }
void Update() { if (sharedData.CarResetNeeded && !sharedData.debugMode && !sharedData.TrainingMode) { setResetText(); sharedData.SetPlayerControl(false); reset = isCarResetButtonPressed(); } else if (sharedData.debugMode) { reset = isCarResetButtonPressed(); } }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody>(); resetCarScript = GetComponent <ResetCar>(); if (!myPlateAgent.isTrainingCar) { sharedData.SetCursorVisible(false); sharedData.SetPlayerControl(true); if (GameObject.Find("wiiMote") != null) //beim debuggen ist sonst wiiMote nullReferenz { wiiDaten = GameObject.Find("wiiMote").GetComponent <wiiKalibrierung>(); wiiRemote = wiiDaten.wiiRemote; } else { wiiDaten = null; wiiRemote = null; } } //Lade eine Strecke, falls der Trainingsmodus aktiv ist if (sharedData.TrainingMode) { RandomDifficulty(); LoadTrainingFiles(dirPathTrainingRoute + currentDifficulty); //vorher currentDifficulty ändern, falls statt "default" einfach, mittel oder schwer angewendet werden soll LoadTrainingRoute(dirPathTrainingRoute + currentDifficulty); } else { //Debug.LogError("Kein Trainignsmodus aktiviert"); } }
private void OnTriggerEnter(Collider other) { //Debug.Log(other.tag.ToString()); if (other.CompareTag("zielbereich")) { //Debug.Log("LadeBild"); anzahlGewonnen++; sharedData.SetPlayerControl(false); //carControl.setPlayerControl(false); PickupLogic pul = this.GetComponent <PickupLogic>(); pul.stopTimer(); coinCount = sharedData.CoinCount; timeNeeded = pul.time; coinCountText.text = coinCount.ToString(); //timeNeededText.text = timeNeeded.ToString(); timeNeededText.text = pul.TimerText.text; if (anzahlGewonnen == 1) { db.InsertNewScore(timeNeeded); } endbildschirm.enabled = true; sharedData.SetCursorVisible(true); Debug.Log("Habe so oft gewonnen: " + anzahlGewonnen); } if (other.CompareTag("zielLevel1")) { Debug.Log("Lade Level2"); sharedData.TimeNeededToLastLevel = pul.time; Debug.Log("Setze time auf: " + pul.time); SceneManager.LoadScene("Level2"); } if (other.CompareTag("zielLevel2")) { sharedData.TimeNeededToLastLevel = pul.time; Debug.Log("Setze time auf: " + pul.time); Debug.Log("Lade Level3"); SceneManager.LoadScene("Level3"); } }