Jump to content

How to do it in processing?

GamerGry123

Anyone know what's going on here?

 

 

 

 

float x=500,y=900, a=900, b=0,c=0,d=0;
void setup();
{
  size(1000,1000);
  textSize(50);
}
void draw()
{
  background(0,0,0);
  fill(255,255,255);
  text("Meta", 500,100);
  text("Meta", 500,900);
  
  fill(255,255,0);
  rect(x,y,50,50);
  fill(0);
  
  fill(255,0,255);
  rect(a,700,100,1000);
  rect(b,500,100,100);
  rect(c,300,100,200);
  rect(d,200,50,50);
  a=a+10;
  b-b+15;
  c=c+7;
  d-d+20;
  {
    if(a>1000)
    {
      a-0;
      
    }
    
  }
  
  {
    if(b>1000)
  {
    
    b-0;
    
    }
  }
      {
      if(c>1000)
      {
        
        c-0;
        
      }
      }
      
      
      
      {
        if(d>10000)
      {
        
        d=0;
        
      }
      }
      
      
      {
        if((x>0)&&(y<0))
        {background(0,0,255);
        text("Wygrać", 400,500);
        
        }
        
        
      }
      }
      void keyPressed()
      {
      if (keyPressed)
      {
        if(keyPressed--UP)
      {
         y-y-10;
      }
        
        
      if(keyCode--DDWN)
        
      {
          
          y-y+10;
          
        }
        
        if(keyCode--RIGHT)
        
        {
          
          if(keyCode==LEFT)
          
          {
            
            x-x-10;
            
          }
          
        }
      }

1.PNG

sketch_1.pde

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×