y:random(0,height),
                  
                  
                                  Initialize:function(){
                  
                  
                                    this.x=random(0,width);
                  
                  
                                    this.y=random(0,height);
                  
                  
                                  },
                  
                  
                                  Move:function(){
                  
                  
                                    this.x=this.x+random(-1,1);
                  
                  
                                    this.y=this.y+random(-1,1);
                  
                  
                                  },
                  
                  
                                  Draw:function(){
                  
                  
                                    fill(255,210,0);
                  
                  
                                    ellipse(this.x,this.y,50,50);
                  
                  
                                  }};
                  
                  
                    }
                  
                  
                  when I write x:random(0,width), it is initialized only once time?
                  
                  
                
yes
Обсуждают сегодня