Exemplo n.º 1
0
        private void GameLobbyAgain()
        {
            // wenn man aus der Highscore-View wegnavigiert, resette das GameModel
            GameModel.Instance.ClearGameModel();
            // und die Highscores
            Highscore.Clear();
            RevanchePossible = "True";

            BackToGameLobby();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
    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();
        }
    }