text 坠落的符文2.pde
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 坠落的符文2.pde相关的知识,希望对你有一定的参考价值。
Rain r1;
PImage img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, img13, img14, img15, img16, img17, img18, img19, img20, img21, img22, img23, img24, img25, img26, img27, img28, img29, img30, img31, img32, img33, img34, img35, img36;
int dice;
int speed;
int numDrops = 40;
Rain[] drops = new Rain[numDrops]; // Declare and create the array
void setup() {
size(1200,600);
smooth();
noStroke();
//Loop through array to create each object
img1 = loadImage("https://i.imgur.com/vH19idL.png");
img2 = loadImage("https://i.imgur.com/lGPZQyd.png");
img3 = loadImage("https://i.imgur.com/S6C0N0p.png");
img4 = loadImage("https://i.imgur.com/EUqg8SR.png");
img5 = loadImage("https://i.imgur.com/Y8cuVgV.png");
img6 = loadImage("https://i.imgur.com/nc13bhi.png");
img7 = loadImage("https://i.imgur.com/GRO4efd.png");
img8 = loadImage("https://i.imgur.com/it3TJ4a.png");
img9 = loadImage("https://i.imgur.com/rtsPlZI.png");
img10 = loadImage("https://i.imgur.com/h2HO2PC.png");
img11 = loadImage("https://i.imgur.com/LbBirzO.png");
img12 = loadImage("https://i.imgur.com/qpJsaFC.png");
img13 = loadImage("https://i.imgur.com/pYjBgkE.png");
img14 = loadImage("https://i.imgur.com/9D35V1o.png");
img15 = loadImage("https://i.imgur.com/WVjzEEA.png");
img16 = loadImage("https://i.imgur.com/WmmnuKb.png");
img17 = loadImage("https://i.imgur.com/HMvCmkn.png");
img18 = loadImage("https://i.imgur.com/RFpszse.png");
img19 = loadImage("https://i.imgur.com/c2nrTT6.png");
img20 = loadImage("https://i.imgur.com/XC1ftRi.png");
img21= loadImage("https://i.imgur.com/4WqDZfi.png");
img22 = loadImage("https://i.imgur.com/x4dE47c.png");
img23 = loadImage("https://i.imgur.com/lVLDD54.png");
img24 = loadImage("https://i.imgur.com/bRumJOi.png");
img25 = loadImage("https://i.imgur.com/V3zSAu9.png");
img26 = loadImage("https://i.imgur.com/UJvB8wk.png");
img27 = loadImage("https://i.imgur.com/kTBsqjW.png");
// img28 = loadImage("");
img29 = loadImage("https://i.imgur.com/HZ24hdV.png");
img30 = loadImage("https://i.imgur.com/0S4EbpH.png");
img31 = loadImage("https://i.imgur.com/mA4jh13.png");
img32 = loadImage("https://i.imgur.com/ijtM99I.png");
img33 = loadImage("https://i.imgur.com/wbFh5FV.png");
img34 = loadImage("https://i.imgur.com/d0XVxw6.png");
img35 = loadImage("https://i.imgur.com/ZQlXg2a.png");
img36 = loadImage("https://i.imgur.com/4rMoXGa.png?1");
for (int i = 0; i < drops.length; i++) {
drops[i] = new Rain(); // Create each object
r1 = new Rain();
}
}
void draw(){
fill(255,80);
background(0);
// rect(0,0,600,600);
//Loop through array to use objects.
for (int i = 0; i < drops.length; i++) {
drops[i].fall();
}
}
class Rain {
float x = random(width);
float y = random(-height, 0);
int size = int(random(50, 100));
int dice = int(random(1, 37));
float speed = random(2, 6);
void fall() {
// y = y + 7;
y+=speed;
fill(0,10,200,180);
if (dice == 1) {
image(img1, x, y, size, size);
} else if (dice == 2) {
image(img2, x, y, size, size);
} else if (dice == 3) {
image(img3, x, y, size, size);
} else if (dice == 4) {
image(img4, x, y, size, size);
} else if (dice == 5) {
image(img5, x, y, size, size);
} else if (dice == 6) {
image(img6, x, y, size, size);
} else if (dice == 7) {
image(img7, x, y, size, size);
} else if (dice == 8) {
image(img8, x, y, size, size);
} else if (dice == 9) {
image(img9, x, y, size, size);
} else if (dice == 10) {
image(img10, x, y, size, size);
} else if (dice == 11) {
image(img11, x, y, size, size);
} else if (dice == 12) {
image(img12, x, y, size, size);
} else if (dice == 13) {
image(img13, x, y, size, size);
} else if (dice == 14) {
image(img14, x, y, size, size);
} else if (dice == 15) {
image(img15, x, y, size, size);
} else if (dice == 16) {
image(img16, x, y, size, size);
} else if (dice == 17) {
image(img17, x, y, size, size);
} else if (dice == 18) {
image(img18, x, y, size, size);
} else if (dice == 19) {
image(img19, x, y, size, size);
} else if (dice == 20) {
image(img20, x, y, size, size);
} else if (dice == 21) {
image(img21, x, y, size, size);
} else if (dice == 22) {
image(img22, x, y, size, size);
} else if (dice == 23) {
image(img23, x, y, size, size);
} else if (dice == 24) {
image(img24, x, y, size, size);
} else if (dice == 25) {
image(img25, x, y, size, size);
} else if (dice == 26) {
image(img26, x, y, size, size);
} else if (dice == 27) {
image(img27, x, y, size, size);
} else if (dice == 28) {
// image(img28, x, y, size, size);
} else if (dice == 29) {
image(img29, x, y, size, size);
} else if (dice == 30) {
image(img30, x, y, size, size);
} else if (dice == 31) {
image(img31, x, y, size, size);
} else if (dice == 32) {
image(img32, x, y, size, size);
} else if (dice == 33) {
image(img33, x, y, size, size);
} else if (dice == 34) {
image(img34, x, y, size, size);
} else if (dice == 35) {
image(img35, x, y, size, size);
} else if (dice == 36) {
image(img36, x, y, size, size);
}
if(y>height){
x = random(width);
y = random(-height, 0);
}
}
}
以上是关于text 坠落的符文2.pde的主要内容,如果未能解决你的问题,请参考以下文章
求暗黑破坏神2全套详细符文之语合成公式,最好是X符文+X符文+X武器=X这样的,求高手,我版本1.11