Example #1
0
    private void Update()
    {
        if (Input.GetKey(KeyCode.R))
        {
            RestartGame();
        }
        playerInfoView.DrawInfo((int)currentPlayer.Score.CurrentScore, population.NrOfSatellites(), lastSatelliteChoice);
        foreach (var m in population.GetAllMinions())
        {
            currentPlayer.Score.AddScore(m.GetCurrentScore());
        }
        if (_gameRunning && population.ActivePlayerTransmitSatellites().Count <= 0)
        {
            if (EnableDecrease)
            {
                currentPlayer.Score.DecreaseScore(noSatalliteDecreaseCost);
            }

            var lost = !satelliteChoser.CanPayAnySatellite();
            if (lost)
            {
                EndGame();
            }
        }

        if (_gameRunning && gameTimer == null)
        {
            gameTimer = new Timer(0);
        }
    }