MyGame.FirstAidManager.addHealth C# (CSharp) Méthode

addHealth() private méthode

add health specified by difficult constants to the health of the player and remove the mdekit
private addHealth ( int j ) : void
j int position of the medkit in the medkits collection
Résultat void
        private void addHealth(int j)
        {
            myGame.player.health += myGame.difficultyConstants.INCREASED_HEALTH_BY_MEDKIT;
            if (myGame.player.health > 100)
                myGame.player.health = 100;
            firstAidKits.RemoveAt(j);
        }