Ejemplo n.º 1
0
    private void UpdateScore(int pointValue, int scrapValue)
    {
        // add point value to HUD
        playerCurrentScore += pointValue;
        playerCurrentScrap += scrapValue;

        if (playerCurrentScrap >= playerMaxScrap)
        {
            playerCurrentScrap = playerMaxScrap;
        }

        //Invoking Update Score/Scrap events to update the HUD
        PlayerEvents.CallUpdatePlayerScore(playerCurrentScore);
        PlayerEvents.CallUpdatePlayerScrap(playerCurrentScrap);
    }