Sep-11-2022, 01:54 AM
(Sep-10-2022, 02:36 PM)XavierPlatinum Wrote:(Sep-10-2022, 04:07 AM)monkeydesu Wrote:if self.rect.right < 0: self.kill()And what does the "right" here mean? I understand it's to wipe the sprite enemy from the screen. Does "right" mean the screen border or something? Super confused! )=
The "right" is the right side of the your rectangle. "0" means the left side of the screen, as the y value is 0. So if the right side of your sprite is less than 0, that means your whole sprite is off the screen to the left.
Ah! That makes so much sense! Thank you haha