a89c030d
pfrison
VRGNYMusicLights ...
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
public void addMusic(Music music) { musics.add(music); }
public void deleteMusic(int index) { musics.remove(index); }
public double[] render(long tick) {
if(musics.size() == 0)
return null;
double[] lights = musics.get(0).render(tick);
for(int i=1; i<musics.size(); i++) {
double[] tmpRender = musics.get(i).render(tick);
for(int j=0; j<lights.length; j++) {
lights[j] += tmpRender[j];
if(lights[j] < 0)
lights[j] = 0;
if(lights[j] > 1)
lights[j] = 1;
}
}
return lights;
}
|