3D progress

This commit is contained in:
Anuken
2020-01-07 10:32:00 -05:00
parent c474b082cd
commit c8980163e9
3 changed files with 39 additions and 8 deletions

View File

@@ -1,15 +1,14 @@
package mindustry.ui.fragments;
import arc.*;
import arc.graphics.g2d.*;
import arc.math.*;
import arc.scene.*;
import arc.scene.event.*;
import mindustry.graphics.*;
/** Fades in a black overlay.*/
public class FadeInFragment extends Fragment{
private static final float duration = 40f;
float time = 0f;
PlanetRenderer rend = new PlanetRenderer();
@Override
public void build(Group parent){
@@ -21,9 +20,10 @@ public class FadeInFragment extends Fragment{
@Override
public void draw(){
Draw.color(0f, 0f, 0f, Mathf.clamp(1f - time));
Fill.crect(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
Draw.color();
//Draw.color(0f, 0f, 0f, Mathf.clamp(1f - time));
//Fill.crect(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
//Draw.color();
rend.draw();
}
@Override
@@ -31,7 +31,7 @@ public class FadeInFragment extends Fragment{
super.act(delta);
time += 1f / duration;
if(time > 1){
remove();
//remove();
}
}
});