Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ty = 130;
- int tx = 76;
- int xini = 5;
- int yini = 8;
- int ani = 1;
- void setup(){
- size(330,145);
- background(255);
- strokeWeight(1);
- stroke(0);
- }
- void draw(){
- fill(0);
- translate(xini,yini);
- if(ani == 1){
- fill(255,255,0);
- }
- else{
- fill(207,226,243);
- }
- triangle(0,0,tx,ty/2,0,ty);
- translate(tx+xini,0);
- if(ani == 2){
- fill(255,255,0);
- }
- else{
- fill(207,226,243);
- }
- triangle(0,0,tx,ty/2,0,ty);
- translate(tx+xini,0);
- if(ani == 3){
- fill(255,255,0);
- }
- else{
- fill(207,226,243);
- }
- triangle(0,0,tx,ty/2,0,ty);
- translate(tx+xini,0);
- if(ani == 4){
- fill(255,255,0);
- }
- else{
- fill(207,226,243);
- }
- triangle(0,0,tx,ty/2,0,ty);
- ani++;
- if(ani == 5){
- ani = 1;
- }
- delay(100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement