Last active
September 16, 2015 12:48
-
-
Save federico-pepe/834b81cbabbf2e1c018e to your computer and use it in GitHub Desktop.
Utilizzo delle variabili II: Esempio 2
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
| /* | |
| * Utilizzo delle variabili II: Esempio 2 | |
| * by Federico Pepe | |
| * http://blog.federicopepe.com | |
| */ | |
| int ellipseX; // dichiarazione della variabile | |
| void setup() { | |
| size(540, 540); | |
| ellipseX = 0; // inizializzazione | |
| } | |
| void draw() { | |
| background(255); | |
| ellipse(ellipseX, height/2, 50, 50); | |
| ellipseX = ellipseX + 1; // aumento il valore di ellipseX | |
| println(ellipseX); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment