a guest Oct 21st, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import arcade
- class MyGame(arcade.Window):
- speedX = 2
- def __init__(self, width, height, title):
- # Call the parent class's init function
- super().__init__(width, height, title)
- # Set the background color
- # Attributes to store where our ball is
- self.ball_x = 50
- self.ball_y = 50
- def on_draw(self):
- """ Called whenever we need to draw the window. """
- self.ball_x, self.ball_y, 15, arcade.color.AUBURN)
- def update(self, delta_time):
- """ Called to update our objects. Happens approximately 60 times per second."""
- self.ball_x = self.ball_x + 2
- def main():
- window = MyGame(640, 480, "Min vindue")
RAW Paste Data