Created
July 30, 2015 00:04
-
-
Save SpaceVoyager/7b9e14d605f80747e028 to your computer and use it in GitHub Desktop.
aquarium1.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scene import * | |
class MyScene (Scene): | |
def setup(self): | |
# This will be called before the first frame is drawn. | |
self.fishx = self.bounds.w | |
self.fishspeed = 3 | |
self.fishsize = 200 | |
def draw(self): | |
# This will be called for every frame (typically 60 times per second). | |
background(0.00, 1.00, 1.00) | |
self.fishx -= self.fishspeed | |
if self.fishx <= -self.fishsize: | |
self.fishx = self.bounds.w | |
image('Fish', self.fishx, 100, self.fishsize, self.fishsize) | |
def touch_began(self, touch): | |
pass | |
def touch_moved(self, touch): | |
pass | |
def touch_ended(self, touch): | |
pass | |
run(MyScene()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment