Last active
February 6, 2017 17:39
-
-
Save sabotai/0299943f76c9cd502cbaad07389a61d3 to your computer and use it in GitHub Desktop.
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
| //introduce setup and draw into your hw from last week | |
| //replace "hard-coded" values with variables that you declare and assign! | |
| int xPos; | |
| void setup(){ | |
| size(1280,720); | |
| xPos = 5; | |
| //frameRate(1); | |
| } | |
| void draw(){ | |
| background(200,10,20); | |
| //this will be the head | |
| ellipse(xPos, 150, 200, 300); | |
| xPos = xPos + frameCount; //move the xPos by the total frame count each time draw runs | |
| println("the x position is ... " + xPos); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment