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

Programmer Humor

32410 readers
1 users here now

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

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] cookie_sabotage@sh.itjust.works 159 points 1 year 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.

[–] Sakychu@lemmy.world 10 points 1 year ago (2 children)

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

[–] cookie_sabotage@sh.itjust.works 15 points 1 year ago (1 children)

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

[–] mac 6 points 1 year ago

The doctor prescribed "getting good"

load more comments (15 replies)