this post was submitted on 28 Mar 2024
615 points (98.1% liked)

Programmer Humor

32453 readers
713 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 159 points 7 months ago (18 children)
public class GameManager : MonoBehaviour
{
    public bool EnableHighContrast;
    public bool PlayerWon;
    public float PlayerUnitsMoved;
    public int PlayerDeathCount;
    public float PlayerHealth;

    public void PlayerTakeDamage(float damage)
    {
        PlayerHealth -= damage;
        if (PlayerHealth < 0)
        {
            PlayerDieAndRespawn();
        }
    }

    public void PlayerDieAndRespawn()
    {
        return;
    }
}

I couldn't contain myself.

[–] [email protected] 10 points 7 months ago (2 children)

I called the takeDamage function and my player disappeared: send 'elp everything foobar

[–] [email protected] 15 points 7 months ago (1 children)

Don't worry! this issue will be fixed in the next patch. In the meantime just try not getting hit.

[–] [email protected] 6 points 7 months ago

The doctor prescribed "getting good"

load more comments (15 replies)