Created
September 16, 2015 10:44
-
-
Save federico-pepe/e75821815141b02aa7be to your computer and use it in GitHub Desktop.
Utilizzo delle variabili II: Esempio 1
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 1 | |
| * 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 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment