Пример #1
0
    public void PlayerTakeDamage(int damage)
    {
        int oldSolders = playerSoldiers;

        playerSoldiers -= damage;
        if (playerSoldiers < 0)
        {
            playerSoldiers = 0;
        }
        int damageTaken = oldSolders - playerSoldiers;

        gameManager.PlayerTakeDamage(damageTaken);
    }