Adrianotiger / desktopPet

Remembering the lovely eSheep (stray sheep) from 1995 -
https://adrianotiger.github.io/desktopPet/
921 stars 87 forks source link

Flip when respawning #74

Open OliverPets opened 3 years ago

OliverPets commented 3 years ago

If an animation disappears when it's flipped, the program tries to respawn it while still flipped. This doesn't affect every spawn, but it breaks all the spawns that come from outside of the border. If I make it flip back before disappearing, it still breaks the spawns.

Could we have the program flip it back to normal automatically if the animation is flipped while spawning?

Adrianotiger commented 3 years ago

Hi Oliver, It should not break the spawns. The idea was that you can spawn it from left or right and once it is flipped it spawn from the other side. Maybe the is a bug, but if you spawn it from outside the border, it should not disappear if the pet is walking or moving to the screen.

OliverPets commented 3 years ago

It doesn't work for me if, for example, the dive into the bathtub spawn happens. It's always on the right side, but if the pet dies while flipped, the spawn still happens on the right side. The pet then tries to dive to the right off screen and dies again. Same thing with when the pet spawns running or walking in from the right. It tries to walk to the right instead when still flipped and dies again.

I think if a pet dies while flipped, the program should flip it back before spawning. Or, it could spawn from the left side when flipped instead, which would look better I think.

Adrianotiger commented 3 years ago

I see. The new spawn position need to be rotated too. I will try to solve it, as the idea was to spawn it on the other side of the screen, not to reset the flip.