So a quick post birthday post.
I was showing some code to my wife who then started to laugh. It is kinda ridiculous what you end up commenting when you're trying to replicate park drinking...
void Update () {
// drink timer
if (drinkTimer > 0f && drinks > 0) {
drinkTimer -= Time.deltaTime;
if (drinkTimer <= 0f && drinking == true) {
// done drinking? make a can
MakeCan();
// have more drinks? keep drinking
Drink();
}
}
// out of drinks?
if (drinks == 0 && drinking == true) {
Headhome();
}
}
Yup. Go home code, you're drunk.