private void GameLobbyAgain() { // wenn man aus der Highscore-View wegnavigiert, resette das GameModel GameModel.Instance.ClearGameModel(); // und die Highscores Highscore.Clear(); RevanchePossible = "True"; BackToGameLobby(); }
private void LeaveGame() { // wenn man aus der Highscore-View wegnavigiert, resette das GameModel GameModel.Instance.ClearGameModel(); // und die Highscores Highscore.Clear(); BackToMenu(); // Beim Server vom Spielraum abmelden // und Kommunikationswege beenden gameConsumer.Terminate(); gameProducer.LeaveCommunication(); gameProducer.Terminate(); }
public void Update() { if (Input.GetKeyUp(KeyCode.P)) { string result = "Score: " + ScoringSystem.Instance.CalculateScore(TargetLocations, FurnitureLocations); foreach (var location in TargetLocations) { result += "\n" + location.gameObject.name + ": ds=" + location.DistanceScore + " as=" + location.AngleScore + " total=" + location.Score; } Debug.Log(result); } if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.Q)) { Highscore.Clear(); } }