Commit 1b4215a2 by BellCodeEditor

auto save

parent 72358465
Showing with 39 additions and 0 deletions
import pygame
from pygame import locals
screen = pygame.display.set_mode((1000,600))
pygame.display.set_caption("bellcode")
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
t = 30
while True:
if jumpState == "up":
if t > 0:
y -= t
t -= 2
else:
jumpState = "down"
if jumpState == "down":
if t <= 30:
y += t
t += 2
else:
jumpState = "runing":
import pygame
cacti= pygame.image.load("cacti.png")
rect = cacti.get_rect()
print(rect)
print(rect.x)
print(rect.y)
print(rect.width)
print(rect.height)
while True:
if rect.x < 0-rect.width:
obstacle = choice([])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment