Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float xpos1;
- int one = 0;
- PImage alpha;
- void setup()
- {
- alpha = loadImage("Alpha.png");
- size (800, 300);
- smooth();
- xpos1 = width/2;
- }
- void draw() {
- fill(0, 55);
- rect(0, 0, width, height);
- noStroke();
- fill(255, 200);
- float mx = mouseX * 0.4 - width/5.0;
- xpos1 += mx/8;
- if(xpos1 < -700) { xpos1 = width;}
- if(xpos1 > width) { xpos1= -700;}
- image(alpha, xpos1, 90);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement